[PATCH] D130492: [AArch64][SVE] Add patterns to select mla/mls
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 25 10:13:10 PDT 2022
paulwalker-arm added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:348
(sub node:$op1, (vselect node:$pred, node:$op2, (SVEDup0)))]>;
+def AArch64mla_p : PatFrags<(ops node:$pred, node:$op1, node:$op2, node:$op3),
+ [(int_aarch64_sve_mla node:$pred, node:$op1, node:$op2, node:$op3),
----------------
`AArch64mla_p` -> `AArch64mla_m1`
`AArch64mls_p` -> `AArch64mls_m1`
================
Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:350
+ [(int_aarch64_sve_mla node:$pred, node:$op1, node:$op2, node:$op3),
+ (add node:$op1, (AArch64mul_p_oneuse node:$pred, node:$op2, node:$op3)),
+ // add(a, select(mask, mul(b, c), splat(0))) -> mla(a, mask, b, c)
----------------
FYI: This is consistent with how the code works today but I suspect we'll eventually pull this pattern out because it should really map to the `FMLA_ZPZZZ_UNDEF` pseudo instructions.
================
Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:352
+ // add(a, select(mask, mul(b, c), splat(0))) -> mla(a, mask, b, c)
+ (add node:$op1, (vselect node:$pred, (AArch64mul_p_oneuse (AArch64ptrue 31), node:$op2, node:$op3), (SVEDup0)))]>;
+def AArch64mls_p : PatFrags<(ops node:$pred, node:$op1, node:$op2, node:$op3),
----------------
Can this be `SVEAllActive`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130492/new/
https://reviews.llvm.org/D130492
More information about the llvm-commits
mailing list