From: Simon Pilgrim Date: Fri, 3 Mar 2017 16:56:33 +0000 (+0000) Subject: Use APInt::getLowBitsSet instead of APInt::getBitsSet for lower bit mask creation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85969be932df26bc12ae40d891f76ba001f8a8eb;p=llvm Use APInt::getLowBitsSet instead of APInt::getBitsSet for lower bit mask creation git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296882 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp index e641acbfbd9..d8824b473a6 100644 --- a/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp +++ b/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp @@ -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));