From 8e662f7f815dcfe04e920c2d022d963524d05d2c Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 6 Jun 2017 07:13:11 +0000 Subject: [ValueTracking] Use the computeKnownBits version that returns a KnownBits object instead of taking one by reference. NFC llvm-svn: 304772 --- llvm/lib/Analysis/ValueTracking.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Analysis') 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(V1->getType())) { + if (isa(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)) -- cgit v1.2.3