[llvm] r296882 - Use APInt::getLowBitsSet instead of APInt::getBitsSet for lower bit mask creation
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 3 08:56:33 PST 2017
Author: rksimon
Date: Fri Mar 3 10:56:33 2017
New Revision: 296882
URL: http://llvm.org/viewvc/llvm-project?rev=296882&view=rev
Log:
Use APInt::getLowBitsSet instead of APInt::getBitsSet for lower bit mask creation
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp?rev=296882&r1=296881&r2=296882&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Fri Mar 3 10:56:33 2017
@@ -852,7 +852,7 @@ Value *InstCombiner::SimplifyShrShlDeman
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));
More information about the llvm-commits
mailing list