summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2017-03-03 16:56:33 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2017-03-03 16:56:33 +0000
commite938a152c5f3949ece4d5b752208b05de311a89e (patch)
treeaa6f2c1dceb9c1d9cc32e3a04fcdec40123e415d /llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
parent9f5db7d4e008737d2ebc8e59f8c542de651ec674 (diff)
downloadbcm5719-llvm-e938a152c5f3949ece4d5b752208b05de311a89e.tar.gz
bcm5719-llvm-e938a152c5f3949ece4d5b752208b05de311a89e.zip
Use APInt::getLowBitsSet instead of APInt::getBitsSet for lower bit mask creation
llvm-svn: 296882
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
index e641acbfbd9..d8824b473a6 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/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));
OpenPOWER on IntegriCloud