diff options
| author | Owen Anderson <resistor@mac.com> | 2010-11-01 21:08:20 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2010-11-01 21:08:20 +0000 |
| commit | 6186c96765e20ba37c22b988b752f4d053463648 (patch) | |
| tree | 705ac5c2198958854c40bd520e30cc314bdab462 /llvm/lib/Transforms | |
| parent | 865dd96f22927642b8718f97c4f739515358f739 (diff) | |
| download | bcm5719-llvm-6186c96765e20ba37c22b988b752f4d053463648.tar.gz bcm5719-llvm-6186c96765e20ba37c22b988b752f4d053463648.zip | |
When folding away a (shl (shr)) pair, we need to check that the bits that will BECOME the low
bits are zero, not that the current low bits are zero. Fixes <rdar://problem/8606771>.
llvm-svn: 117953
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp index 27716b886a2..012d238729a 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp @@ -157,7 +157,7 @@ static bool CanEvaluateShifted(Value *V, unsigned NumBits, bool isLeftShift, if (CI->getZExtValue() > NumBits) { unsigned LowBits = CI->getZExtValue() - NumBits; if (MaskedValueIsZero(I->getOperand(0), - APInt::getLowBitsSet(TypeWidth, LowBits))) + APInt::getLowBitsSet(TypeWidth, LowBits) << NumBits)) return true; } |

