[PATCH] D128045: [AArch64][SVE] Match (add x (lsr/asr y c)) -> usra/ssra x y c

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 04:41:57 PDT 2022


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:3216-3236
+let Predicates = [HasSVE2orSME] in {
+  multiclass sraPat<ValueType Ty, ValueType PredTy, ValueType ShiftTy,
+                    ComplexPattern cast, SDPatternOperator shift,
+                    Instruction DestAdrIns> {
+    def : Pat<(add Ty:$Op1,
+                  (Ty (shift (PredTy (SVEAllActive)),
+                                    Ty:$Op2,
----------------
Rather than adding new patterns can you create a `PatFrags` instead? See `AArch64saba` for what I mean.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128045



More information about the llvm-commits mailing list