diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index b956d390a81..3a04f5eb869 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/lib/Analysis/ValueTracking.cpp @@ -509,13 +509,9 @@ void llvm::ComputeMaskedBits(Value *V, const APInt &Mask, ComputeMaskedBits(R, Mask2, KnownZero2, KnownOne2, TD, Depth+1); Mask2 = APInt::getLowBitsSet(BitWidth, KnownZero2.countTrailingOnes()); - - // We need to take the minimum number of known bits - APInt KnownZero3(KnownZero), KnownOne3(KnownOne); - KnownOne3.clear(); - KnownZero3.clear(); - ComputeMaskedBits(L, Mask2, KnownZero3, KnownOne3, TD, Depth+1); - + KnownOne2.clear(); + KnownZero2.clear(); + ComputeMaskedBits(L, Mask2, KnownZero2, KnownOne2, TD, Depth+1); KnownZero = Mask & APInt::getLowBitsSet(BitWidth, KnownZero2.countTrailingOnes());