diff options
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCasts.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCasts.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCasts.cpp b/lib/Transforms/InstCombine/InstCombineCasts.cpp index d2ab61845f..77ad828958 100644 --- a/lib/Transforms/InstCombine/InstCombineCasts.cpp +++ b/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -912,7 +912,8 @@ Instruction *InstCombiner::transformSExtICmp(ICmpInst *ICI, Instruction &CI) { APInt TypeMask(APInt::getAllOnesValue(BitWidth)); ComputeMaskedBits(Op0, TypeMask, KnownZero, KnownOne); - if ((~KnownZero).isPowerOf2()) { + APInt KnownZeroMask(~KnownZero); + if (KnownZeroMask.isPowerOf2()) { Value *In = ICI->getOperand(0); if (!Op1C->isZero() == (Pred == ICmpInst::ICMP_NE)) { |