]> granicus.if.org Git - llvm/commitdiff
Use APInt::getLowBitsSet instead of APInt::getBitsSet for lower bit mask creation
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 3 Mar 2017 16:56:33 +0000 (16:56 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 3 Mar 2017 16:56:33 +0000 (16:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296882 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

index e641acbfbd98b0299cbefdc47ae6cc42619d0e1b..d8824b473a6a27eae2442f5bf0a25ec58f003f18 100644 (file)
@@ -852,7 +852,7 @@ Value *InstCombiner::SimplifyShrShlDemandedBits(Instruction *Shr,
   unsigned ShrAmt = ShrOp1.getZExtValue();
 
   KnownOne.clearAllBits();
-  KnownZero = APInt::getBitsSet(KnownZero.getBitWidth(), 0, ShlAmt-1);
+  KnownZero = APInt::getLowBitsSet(KnownZero.getBitWidth(), ShlAmt - 1);
   KnownZero &= DemandedMask;
 
   APInt BitMask1(APInt::getAllOnesValue(BitWidth));