diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-27 23:08:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-27 23:08:34 +0000 |
commit | 424db0209c88dda9fc0fdeb1ac22f85261e744da (patch) | |
tree | 3739f76d641ae9c719bf9447c53af684231fa5cd | |
parent | 20642879344fd8aab54114ce52c03c4f38e1839d (diff) |
Fix test/Transforms/InstCombine/2007-01-27-AndICmp.ll, a miscompilation of
Mozilla that Anton tracked down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33591 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index d38c7c46c2..12a886aebe 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -3288,7 +3288,8 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) { Instruction *Add = BinaryOperator::createAdd(LHSVal, AddCST, LHSVal->getName()+".off"); InsertNewInstBefore(Add, I); - return new ICmpInst(ICmpInst::ICMP_UGT, Add, AddCST); + return new ICmpInst(ICmpInst::ICMP_UGT, Add, + ConstantInt::get(Add->getType(), 1)); } break; // (X != 13 & X != 15) -> no change } |