[PATCH] D118345: [AArch64][SVE] Fold gather/scatter with 32bits when possible

Caroline via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 03:25:22 PST 2022


CarolineConcatto created this revision.
Herald added subscribers: psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a reviewer: efriedma.
CarolineConcatto requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In AArch64ISelLowering.cpp this patch implements these folds:

1. GEP (%ptr, SHL ((splat(%offset) + stepvector(A)) << splat(B)))

into GEP (%ptr + (%offset << B), step_vector (A << B))

The above transform simplifies the index operand so that it can be expressed
as i32 elements.
This allows using only one gather/scatter assembly instruction instead of two.

Patch by Paul Walker (@paulwalker-arm).

Depends on D117900 <https://reviews.llvm.org/D117900>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118345

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/sve-gather-scatter-addr-opts.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118345.403576.patch
Type: text/x-patch
Size: 6963 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220127/94228bcc/attachment.bin>


More information about the llvm-commits mailing list