[llvm] [SDPatternMatch] Add m_CondCode, m_NoneOf, and some ZExt/SExt improvements (PR #90762)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Wed May 1 13:26:22 PDT 2024
================
@@ -718,6 +723,20 @@ inline SpecificInt_match m_Zero() { return m_SpecificInt(0U); }
inline SpecificInt_match m_One() { return m_SpecificInt(1U); }
inline SpecificInt_match m_AllOnes() { return m_SpecificInt(~0U); }
+// FIXME: We probably ought to move constant matchers before
+// most of the others so that m_ZExt/m_ZExtOrSelf can be
+// with other extension matchers.
+template <typename Opnd> inline auto m_ZExt(const Opnd &Op) {
+ return m_AnyOf(UnaryOpc_match<Opnd>(ISD::ZERO_EXTEND, Op),
+ m_And(Op, m_AllOnes()));
----------------
mshockwave wrote:
I must be tired and mixed that with something else. It's removed now.
https://github.com/llvm/llvm-project/pull/90762
More information about the llvm-commits
mailing list