summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-06-06 07:13:11 +0000
committerCraig Topper <craig.topper@gmail.com>2017-06-06 07:13:11 +0000
commit8e662f7f815dcfe04e920c2d022d963524d05d2c (patch)
treefd9e332f24128c784f7da5f0b175edd67190b1b4 /llvm/lib
parent8365df825e78a24df0de894434f4cf699a6d178d (diff)
downloadbcm5719-llvm-8e662f7f815dcfe04e920c2d022d963524d05d2c.tar.gz
bcm5719-llvm-8e662f7f815dcfe04e920c2d022d963524d05d2c.zip
[ValueTracking] Use the computeKnownBits version that returns a KnownBits object instead of taking one by reference. NFC
llvm-svn: 304772
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 4f1a6c5138f..581e540d0d9 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -1990,14 +1990,11 @@ static bool isKnownNonEqual(const Value *V1, const Value *V2, const Query &Q) {
if (isAddOfNonZero(V1, V2, Q) || isAddOfNonZero(V2, V1, Q))
return true;
- if (IntegerType *Ty = dyn_cast<IntegerType>(V1->getType())) {
+ if (isa<IntegerType>(V1->getType())) {
// Are any known bits in V1 contradictory to known bits in V2? If V1
// has a known zero where V2 has a known one, they must not be equal.
- auto BitWidth = Ty->getBitWidth();
- KnownBits Known1(BitWidth);
- computeKnownBits(V1, Known1, 0, Q);
- KnownBits Known2(BitWidth);
- computeKnownBits(V2, Known2, 0, Q);
+ KnownBits Known1 = computeKnownBits(V1, 0, Q);
+ KnownBits Known2 = computeKnownBits(V2, 0, Q);
if (Known1.Zero.intersects(Known2.One) ||
Known2.Zero.intersects(Known1.One))
OpenPOWER on IntegriCloud