aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2022-12-13 16:09:50 -0500
committerSanjay Patel <spatel@rotateright.com>2022-12-13 16:12:09 -0500
commit3ed6143e817ea59e91e965f424514c4c02dab13f (patch)
tree4c3a3e8a8ceeeedbf54d547d0f3f727fffc0b22c /llvm/lib/Analysis/ValueTracking.cpp
parent518e6f12f37cc47be99c6d218bf07c0191c66de2 (diff)
downloadllvm-3ed6143e817ea59e91e965f424514c4c02dab13f.zip
llvm-3ed6143e817ea59e91e965f424514c4c02dab13f.tar.gz
llvm-3ed6143e817ea59e91e965f424514c4c02dab13f.tar.bz2
Revert "[ValueTracking] peek through extends in haveNoCommonBitsSet"
This reverts commit 7520d187cf0dedcf5085f71bc1a5472c75cc8dbb. The pre-commit patch that was supposed to NFC add tests for this patch picked up some code that should not be here. I'll clean up and re-commit.
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index c59cf3f..66cae4e 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -270,13 +270,10 @@ bool llvm::haveNoCommonBitsSet(const Value *LHS, const Value *RHS,
match(LHS, m_c_Xor(m_c_And(m_Specific(RHS), m_Value(Y)), m_Deferred(Y))))
return true;
- // Peek through extends to find a 'not' of the other side:
+ // Peek through extends:
// (ext Y) op ext(~Y)
- // (ext ~Y) op ext(Y)
- if ((match(LHS, m_ZExtOrSExt(m_Value(Y))) &&
- match(RHS, m_ZExtOrSExt(m_Not(m_Specific(Y))))) ||
- (match(RHS, m_ZExtOrSExt(m_Value(Y))) &&
- match(LHS, m_ZExtOrSExt(m_Not(m_Specific(Y))))))
+ if (match(LHS, m_ZExtOrSExt(m_Value(Y))) &&
+ match(RHS, m_ZExtOrSExt(m_Not(m_Specific(Y)))))
return true;
// Look for: (A & B) op ~(A | B)