[llvm] [AArch64][SVE] Mark AES instructions commutable. (PR #142919)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 5 06:28:32 PDT 2025
================
@@ -9254,7 +9254,9 @@ class sve2_crypto_des_bin_op<bits<2> opc, string asm, ZPRRegOp zprty>
}
multiclass sve2_crypto_des_bin_op<bits<2> opc, string asm, ZPRRegOp zprty,
- SDPatternOperator op, ValueType vt> {
+ SDPatternOperator op, ValueType vt,
+ bit commutable = 0> {
+ let isCommutable = commutable in
----------------
paulwalker-arm wrote:
No, worst come to worst I'll be happy with the current approach.
Just before that though... The multiclass only has a single pattern and we're unlikely to add more so I think you can remove the multiclass and change the main class's DAG from `[]` to `[(set (vt zprty:$Zdn), (op (vt zprty:$_Zdn), (vt zprty:$Zm)))]` and then you'll be able to wrap the relevant definitions with `isCommutable`.
https://github.com/llvm/llvm-project/pull/142919
More information about the llvm-commits
mailing list