[llvm] [DAG] Enhance SDPatternMatch to match integer minimum and maximum patterns in addition to the existing ISD nodes. (PR #111774)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 06:26:28 PDT 2024


================
@@ -683,25 +683,45 @@ inline BinaryOpc_match<LHS, RHS, true> m_Xor(const LHS &L, const RHS &R) {
 }
 
 template <typename LHS, typename RHS>
-inline auto m_SMin(const LHS &L, const RHS &R) {
+inline BinaryOpc_match<LHS, RHS, true> m_SMin(const LHS &L, const RHS &R) {
----------------
c8ef wrote:

Other raw binary matchers use an explicit return type, so I believe we could maintain consistency with them.

https://github.com/llvm/llvm-project/pull/111774


More information about the llvm-commits mailing list