[PATCH] D45828: [PatternMatch] Stabilize the matching order of commutative matchers
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 19 10:46:47 PDT 2018
lebedev.ri added inline comments.
================
Comment at: include/llvm/IR/PatternMatch.h:495
+/// A commutative-friendly version of m_Specific().
+inline specificvalc_ty m_c_Specific(specificvalc_ty::ValTy *V) { return V; }
+
----------------
craig.topper wrote:
> This doesn't only fix commutative so I don't think the name should be tied to that.
>
> This was also not possible before, but would be with this new matcher.
>
> ```
> match(m_And(m_Value(X), m_Or(m_Specific(X), m_Value(Y))
> ```
Yes, i agree.
Any suggestions for a better name?
Repository:
rL LLVM
https://reviews.llvm.org/D45828
More information about the llvm-commits
mailing list