projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8631cd
)
[ValueTracking] Use APInt::isNegative(). NFC
author
Craig Topper
<craig.topper@gmail.com>
Fri, 14 Apr 2017 06:43:32 +0000
(06:43 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Fri, 14 Apr 2017 06:43:32 +0000
(06:43 +0000)
llvm-svn: 300308
llvm/lib/Analysis/ValueTracking.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/ValueTracking.cpp
b/llvm/lib/Analysis/ValueTracking.cpp
index
721c01b
..
8479bc7
100644
(file)
--- 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