[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


================
@@ -1012,6 +1025,11 @@ let Predicates = [HasSVE_or_SME] in {
   defm SEL_ZPZZ   : sve_int_sel_vvv<"sel", vselect>;
 
   defm SPLICE_ZPZ : sve_int_perm_splice<"splice", AArch64splice>;
+
+  def : SVE_2_Op_Neg_One_Replace_Pat<nxv16i8, AArch64mul_m1, nxv16i1, NEG_ZPmZ_B , DUP_ZI_B, i32>;
----------------
Lukacma wrote:

It would probably be better to have all these patterns together, instead of scattered in the file

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


More information about the llvm-commits mailing list