From 43a5f59f148b09e7ce2495a7d61bf8fdb06c2a52 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 6 Jun 2017 07:13:11 +0000 Subject: [PATCH] [ValueTracking] Use the computeKnownBits version that returns a KnownBits object instead of taking one by reference. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304772 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ValueTracking.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index 4f1a6c5138f..581e540d0d9 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/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)) -- 2.50.1