[PATCH] D120570: [SVE] Add pattern to commute FMSB operands

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 28 04:40:24 PST 2022


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:549-550
               (!cast<Instruction>("FMLS_ZPZZZ_UNDEF_"#Suffix) $P, ZPR:$Za, ZPR:$Zn, ZPR:$Zm)>;
+    def : Pat<(Ty (AArch64fma_p PredTy:$P, Ty:$Zn, (AArch64fneg_mt PredTy:$P, Ty:$Zm, (Ty (undef))), Ty:$Za)),
+              (!cast<Instruction>("FMLS_ZPZZZ_UNDEF_"#Suffix) $P, ZPR:$Za, ZPR:$Zm, ZPR:$Zn)>;
 
----------------
Perhaps you can create a `PatFrags` called `AArch64fmls_p` that contains the two compatible forms of `AArch64fma_p`.  You should then be able to update the relevant patterns here instead of needing new ones. See `AArch64bic` for inspiration.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120570/new/

https://reviews.llvm.org/D120570



More information about the llvm-commits mailing list