aboutsummaryrefslogtreecommitdiff
path: root/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
commit9b9918246caedae5b236cc1eabfb0634bc540437 (patch)
tree162fc55ec9f5883c0740dd2949920a7a150e05bc /lib/Transforms
parent514b4b0a1fc1a652e253227d18d8b1128777163c (diff)
Fix a bug Nate noticed, where we miscompiled a simple testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 3119e57044..61acad04f3 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/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,