Fix a bug I introduced with my patch yesterday which broke Qt (I converted
authorChris Lattner <sabre@nondot.org>
Tue, 3 Apr 2007 23:29:39 +0000 (23:29 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 3 Apr 2007 23:29:39 +0000 (23:29 +0000)
some constant exprs to apints).

Thanks to Anton for tracking down a small testcase that triggered this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35633 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index a20bf8dc737b7edf0753e357bfeea80a685add43..d26fbced5b1fb71aebb8fc719868aeaf531e5ae6 100644 (file)
@@ -5087,7 +5087,7 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
                                       Mask, LHSI->getName()+".mask");
           Value *And = InsertNewInstBefore(AndI, ICI);
           return new ICmpInst(ICI.getPredicate(), And,
-                              ConstantInt::get(RHSV << ShAmtVal));
+                              ConstantInt::get(RHSV.lshr(ShAmtVal)));
         }
       }
     }