From: Reid Spencer Date: Mon, 26 Mar 2007 23:45:51 +0000 (+0000) Subject: For PR1271: X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=68d27cf84efcaec4a7b73bbec35bea893bfbe65b;p=oota-llvm.git For PR1271: Fix another incorrectly converted shift mask. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35371 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 3c06558d15b..b7c14c6f003 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -5887,7 +5887,7 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1, BinaryOperator::createShl(X, ConstantInt::get(Ty, ShiftDiff)); InsertNewInstBefore(Shift, I); - APInt Mask(APInt::getHighBitsSet(TypeBits, TypeBits - ShiftAmt2)); + APInt Mask(APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt2)); return BinaryOperator::createAnd(Shift, ConstantInt::get(Mask)); }