[PATCH] D120894: [AArch64][SVE]Make better use of gather/scatter when inside a loop body

Caroline via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 05:18:28 PST 2022


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

In the loopvectorizer it hoists out from the loop body some variables
to optimize the loop body. When the loop has a gather/scatter
it hoists out parts of the index, as the step_vector.

However, with gather/scatter when parts of the index (step_vector and index)
are hoisted out from the loop, the compiler cannot check if the index could be
folded in 32 bits (in findMoreOptimalIndexType).

This patch pulls stepvector and the index to be inside the loop body, so we
can check if the compiler can fold the gather/scatter.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120894

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: D120894.412682.patch
Type: text/x-patch
Size: 23135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220303/ffc87b0f/attachment.bin>


More information about the llvm-commits mailing list