[llvm] r304772 - [ValueTracking] Use the computeKnownBits version that returns a KnownBits object instead of taking one by reference. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 00:13:11 PDT 2017
Author: ctopper
Date: Tue Jun 6 02:13:11 2017
New Revision: 304772
URL: http://llvm.org/viewvc/llvm-project?rev=304772&view=rev
Log:
[ValueTracking] Use the computeKnownBits version that returns a KnownBits object instead of taking one by reference. NFC
Modified:
llvm/trunk/lib/Analysis/ValueTracking.cpp
Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=304772&r1=304771&r2=304772&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Tue Jun 6 02:13:11 2017
@@ -1990,14 +1990,11 @@ static bool isKnownNonEqual(const Value
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))
More information about the llvm-commits
mailing list