From 0a2cedfdb95fe396f896ba461f0d4b15e0124c64 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 25 Apr 2017 16:48:03 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301323 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ValueTracking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index e2ffa440c90..ecb169cb0db 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/lib/Analysis/ValueTracking.cpp @@ -1532,7 +1532,7 @@ void computeKnownBits(const Value *V, APInt &KnownZero, APInt &KnownOne, // 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; -- 2.40.0