summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-14 06:43:32 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-14 06:43:32 +0000
commit1281deaa00cb47caebb454f72a89763b0e3b9119 (patch)
treebeeb73e3758e3c4ccbd8fdd9b7a1f2bd982127dd /llvm/lib
parentf8631cd1deed13d45bf36b796dd4f27cf1439776 (diff)
downloadbcm5719-llvm-1281deaa00cb47caebb454f72a89763b0e3b9119.tar.gz
bcm5719-llvm-1281deaa00cb47caebb454f72a89763b0e3b9119.zip
[ValueTracking] Use APInt::isNegative(). NFC
llvm-svn: 300308
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 721c01be333..8479bc76c59 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -1006,7 +1006,7 @@ static void computeKnownBitsFromOperator(const Operator *I, APInt &KnownZero,
MaxHighZeros = std::max(KnownZero.countLeadingOnes(),
KnownZero2.countLeadingOnes());
// If either side is negative, the result is negative.
- else if (KnownOne[BitWidth - 1] || KnownOne2[BitWidth - 1])
+ else if (KnownOne.isNegative() || KnownOne2.isNegative())
MaxHighOnes = 1;
} else if (SPF == SPF_UMAX) {
// We can derive a lower bound on the result by taking the max of the
OpenPOWER on IntegriCloud