[llvm] r301323 - [ValueTracking] Use BitWidth local variable instead of re-reading it from KnownZero. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 09:48:04 PDT 2017


Author: ctopper
Date: Tue Apr 25 11:48:03 2017
New Revision: 301323

URL: http://llvm.org/viewvc/llvm-project?rev=301323&view=rev
Log:
[ValueTracking] Use BitWidth local variable instead of re-reading it from KnownZero. NFC

This is a pre-commit for a patch that I'm working on to merge KnownZero/KnownOne into a KnownBits struct which would have had to touch this line.

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=301323&r1=301322&r2=301323&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Tue Apr 25 11:48:03 2017
@@ -1532,7 +1532,7 @@ void computeKnownBits(const Value *V, AP
     // We know that CDS must be a vector of integers. Take the intersection of
     // each element.
     KnownZero.setAllBits(); KnownOne.setAllBits();
-    APInt Elt(KnownZero.getBitWidth(), 0);
+    APInt Elt(BitWidth, 0);
     for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) {
       Elt = CDS->getElementAsInteger(i);
       KnownZero &= ~Elt;




More information about the llvm-commits mailing list