[PATCH] D97858: [AArch64][SVE] Fold vector ZExt/SExt into gather loads where possible

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 05:11:08 PDT 2021


kmclaughlin accepted this revision.
kmclaughlin added a comment.
This revision is now accepted and ready to land.

LGTM! I think it's probably worth checking if we can do this for scatter stores at some point as well.



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:14386
+                    Opc == AArch64ISD::GLD1_UXTW_SCALED_MERGE_ZERO;
+  const bool Extended = SExt || ZExt;
+
----------------
nit: if SExt & ZExt aren't used anywhere else, could you remove them and just set Extended based on the opcode? i.e.

```
const bool Extended = Opc == AArch64ISD::GLD1_SXTW_MERGE_ZERO ||
                      Opc == AArch64ISD::GLD1_SXTW_SCALED_MERGE_ZERO ||
                      Opc == AArch64ISD::GLD1_UXTW_MERGE_ZERO ||
                      Opc == AArch64ISD::GLD1_UXTW_SCALED_MERGE_ZERO;
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97858



More information about the llvm-commits mailing list