[PATCH] D95350: [SVE][LoopVectorize] Add gather/scatter support for SVE

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 05:09:54 PST 2021


david-arm created this revision.
david-arm added reviewers: sdesmalen, kmclaughlin, Florian, frasercrmck.
Herald added subscribers: NickHung, psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a reviewer: efriedma.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch updates IRBuilder::CreateMaskedGather/Scatter to work
with ScalableVectorType and adds isLegalMaskedGather/Scatter functions
to AArch64TargetTransformInfo.

For in LoopVectorize.cpp I've changed setCostBasedWideningDecision to
avoid attempting to widen interleaved accesses for scalable vectors
since currently this relies upon using shuffle vector for reversing
vectors. In addition, in the same function I have assumed the cost of
scalarising memory ops is infinitely expensive.

I have added some simple gather/scatter tests, including cases we
use gathers and scatters for conditional invariant loads and stores.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95350

Files:
  llvm/lib/IR/IRBuilder.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/sve-gather-scatter.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95350.318973.patch
Type: text/x-patch
Size: 13640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210125/09d8127e/attachment.bin>


More information about the llvm-commits mailing list