summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-27 23:08:34 +0000
committerChris Lattner <sabre@nondot.org>2007-01-27 23:08:34 +0000
commitc8fb6de78c9d32081510dcac4a8549ca8f943d5b (patch)
tree77659fe7063a9a43c14ca1d5cd6ddb668369ff3a /llvm/lib
parentd50698107efee3947306074d96830043f75c989a (diff)
downloadbcm5719-llvm-c8fb6de78c9d32081510dcac4a8549ca8f943d5b.tar.gz
bcm5719-llvm-c8fb6de78c9d32081510dcac4a8549ca8f943d5b.zip
Fix test/Transforms/InstCombine/2007-01-27-AndICmp.ll, a miscompilation of
Mozilla that Anton tracked down. llvm-svn: 33591
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index d38c7c46c2c..12a886aebe5 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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
}
OpenPOWER on IntegriCloud