[llvm] Fold SVE mul and mul_u to neg during isel (PR #160828)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 2 04:19:13 PDT 2025
================
@@ -723,6 +723,16 @@ class SVE2p1_Cvt_VG2_Pat<string name, SDPatternOperator intrinsic, ValueType out
: Pat<(out_vt (intrinsic in_vt:$Zn1, in_vt:$Zn2)),
(!cast<Instruction>(name) (REG_SEQUENCE ZPR2Mul2, in_vt:$Zn1, zsub0, in_vt:$Zn2, zsub1))>;
+class SVE_2_Op_Neg_One_Replace_Pat<ValueType vt, SDPatternOperator op, ValueType pt,
----------------
Lukacma wrote:
I wonder if these classes are necessary here. I think it would be okay to just define patterns directly in SVEInstrInfo instead of adding this layer of indirection. If not, a t least moving this classes into SVEInstrInfo would be good so its easier to see what these patterns are for.
https://github.com/llvm/llvm-project/pull/160828
More information about the llvm-commits
mailing list