From: Chris Lattner Date: Tue, 3 Apr 2007 23:29:39 +0000 (+0000) Subject: Fix a bug I introduced with my patch yesterday which broke Qt (I converted X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=7305084156b6edc4d4b12e3c9d5f7f6609d38e70;p=oota-llvm.git Fix a bug I introduced with my patch yesterday which broke Qt (I converted 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 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index a20bf8dc737..d26fbced5b1 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -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))); } } }