[llvm] [AArch64] Match indexed forms of fmul/fmla/fmls (PR #144892)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 20 07:13:38 PDT 2025


================
@@ -562,6 +570,10 @@ def AArch64fmul : PatFrags<(ops node:$op1, node:$op2),
                             [(fmul node:$op1, node:$op2),
                              (AArch64fmul_p (SVEAllActive), node:$op1, node:$op2)]>;
 
+def AArch64fmulidx : PatFrags<(ops node:$op1, node:$op2, node:$idx),
+                              [(AArch64fmul node:$op1, (int_aarch64_sve_dup_laneq node:$op2, node:$idx)),
+                               (AArch64fmul (int_aarch64_sve_dup_laneq node:$op2, node:$idx), node:$op1)]>;
----------------
paulwalker-arm wrote:

Is it possible to add the intrinsic to the PatFrags?, then you can pass `AArch64fmulidx` into the instruction class removing the need for the dedicated patterns. Same goes for the `AArch64fmlaidx` and `AArch64fmlsidx`.

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


More information about the llvm-commits mailing list