summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-22 04:53:16 +0000
committerChris Lattner <sabre@nondot.org>2004-10-22 04:53:16 +0000
commit5c3c21e10a84c73671bda1ca497fe3208d5fab5c (patch)
tree2caa61882531bcd45353302075245b689b6b1e40 /llvm/lib/Transforms
parent35572eb6f98edd24e630c6bc9023b08443cc5841 (diff)
downloadbcm5719-llvm-5c3c21e10a84c73671bda1ca497fe3208d5fab5c.tar.gz
bcm5719-llvm-5c3c21e10a84c73671bda1ca497fe3208d5fab5c.zip
Fix a bug Nate noticed, where we miscompiled a simple testcase
llvm-svn: 17157
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 3119e570440..61acad04f32 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -1285,7 +1285,7 @@ Instruction *InstCombiner::OptAndOp(Instruction *Op,
Constant *AllOne = ConstantIntegral::getAllOnesValue(AndRHS->getType());
Constant *ShrMask = ConstantExpr::getUShr(AllOne, OpRHS);
Constant *CI = ConstantExpr::getAnd(AndRHS, ShrMask);
- if (CI == ShrMask) { // Masking out bits shifted in.
+ if (CI == AndRHS) { // Masking out bits shifted in.
// Make the argument unsigned.
Value *ShVal = Op->getOperand(0);
ShVal = InsertCastBefore(ShVal,
OpenPOWER on IntegriCloud