diff options
| author | Duncan Sands <baldrick@free.fr> | 2011-01-29 13:27:00 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2011-01-29 13:27:00 +0000 |
| commit | 2e9e4f1be3f99a3fb315da03b49ab5569cb6dacd (patch) | |
| tree | 40c617f9ff6b0d0d364def26a7a335bdf90d1c3d /llvm/lib/Analysis/ValueTracking.cpp | |
| parent | 65bb14d3683e64cc50ae9004367f664f9c9b368c (diff) | |
| download | llvm-2e9e4f1be3f99a3fb315da03b49ab5569cb6dacd.zip llvm-2e9e4f1be3f99a3fb315da03b49ab5569cb6dacd.tar.gz llvm-2e9e4f1be3f99a3fb315da03b49ab5569cb6dacd.tar.bz2 | |
Fix typo: should have been testing that X was odd, not V.
llvm-svn: 124533
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
| -rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index aa7769e..72b3f03 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -715,16 +715,16 @@ bool llvm::isKnownNonZero(Value *V, const TargetData *TD, unsigned Depth) { if (isa<SExtInst>(V) || isa<ZExtInst>(V)) return isKnownNonZero(cast<Instruction>(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; |
