summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DemandedBits.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-28 16:58:05 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-28 16:58:05 +0000
commit24db6b800fcdf0b45f1e2489ec3a7fb57937f0d1 (patch)
tree9bb13c2474c0f2d0e37ee8db12b9c27b7ebc4fa2 /llvm/lib/Analysis/DemandedBits.cpp
parent96d6ee857653f7b155fa96e5200de3a527ec31c2 (diff)
downloadbcm5719-llvm-24db6b800fcdf0b45f1e2489ec3a7fb57937f0d1.tar.gz
bcm5719-llvm-24db6b800fcdf0b45f1e2489ec3a7fb57937f0d1.zip
[APInt] Add clearSignBit method. Use it and setSignBit in a few places. NFCI
llvm-svn: 301656
Diffstat (limited to 'llvm/lib/Analysis/DemandedBits.cpp')
-rw-r--r--llvm/lib/Analysis/DemandedBits.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/DemandedBits.cpp b/llvm/lib/Analysis/DemandedBits.cpp
index 285339deaaf..9f5dc531823 100644
--- a/llvm/lib/Analysis/DemandedBits.cpp
+++ b/llvm/lib/Analysis/DemandedBits.cpp
@@ -181,7 +181,7 @@ void DemandedBits::determineLiveOperandBits(
// bits, then we must keep the highest input bit.
if ((AOut & APInt::getHighBitsSet(BitWidth, ShiftAmt))
.getBoolValue())
- AB.setBit(BitWidth-1);
+ AB.setSignBit();
// If the shift is exact, then the low bits are not dead
// (they must be zero).
@@ -239,7 +239,7 @@ void DemandedBits::determineLiveOperandBits(
if ((AOut & APInt::getHighBitsSet(AOut.getBitWidth(),
AOut.getBitWidth() - BitWidth))
.getBoolValue())
- AB.setBit(BitWidth-1);
+ AB.setSignBit();
break;
case Instruction::Select:
if (OperandNo != 0)
OpenPOWER on IntegriCloud