From 9136782d273cd45b6f19a7d0cc0d146d0791bac9 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Sat, 29 Jan 2011 13:27:00 +0000 Subject: Fix typo: should have been testing that X was odd, not V. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124533 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ValueTracking.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Analysis/ValueTracking.cpp') diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index aa7769ea54..72b3f03a93 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/lib/Analysis/ValueTracking.cpp @@ -715,16 +715,16 @@ bool llvm::isKnownNonZero(Value *V, const TargetData *TD, unsigned Depth) { if (isa(V) || isa(V)) return isKnownNonZero(cast(V)->getOperand(0), TD, Depth); - // shl X, A != 0 if X is odd. Note that the value of the shift is undefined + // shl X, Y != 0 if X is odd. Note that the value of the shift is undefined // if the lowest bit is shifted off the end. if (BitWidth && match(V, m_Shl(m_Value(X), m_Value(Y)))) { APInt KnownZero(BitWidth, 0); APInt KnownOne(BitWidth, 0); - ComputeMaskedBits(V, APInt(BitWidth, 1), KnownZero, KnownOne, TD, Depth); + ComputeMaskedBits(X, APInt(BitWidth, 1), KnownZero, KnownOne, TD, Depth); if (KnownOne[0]) return true; } - // shr X, A != 0 if X is negative. Note that the value of the shift is not + // shr X, Y != 0 if X is negative. Note that the value of the shift is not // defined if the sign bit is shifted off the end. else if (match(V, m_Shr(m_Value(X), m_Value(Y)))) { bool XKnownNonNegative, XKnownNegative; -- cgit v1.2.3