diff options
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index ee4f97f..2c52107 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -620,7 +620,7 @@ static void computeKnownBitsFromCmp(const Value *V, CmpInst::Predicate Pred, if (RHS->getType()->isPointerTy()) { // Handle comparison of pointer to null explicitly, as it will not be // covered by the m_APInt() logic below. - if (match(RHS, m_Zero())) { + if (LHS == V && match(RHS, m_Zero())) { switch (Pred) { case ICmpInst::ICMP_EQ: Known.setAllZero(); |