[PATCH] D86249: [llvm][sve] Make `llvm.masked.[gather|scatter]` legal for SVE.

Francesco Petrogalli via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 14:57:51 PDT 2020


fpetrogalli created this revision.
fpetrogalli added reviewers: ctetreau, david-arm, efriedma.
Herald added subscribers: llvm-commits, psnobl, hiraditya, tschuett.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.
fpetrogalli requested review of this revision.

This patch prevents the `llvm.masked.gather` and `llvm.masked.scatter`
intrinsics to be scalarized when targeting SVE.

The change in `Function.cpp` is needed to prevent the warning that is
raised when `getNumElements` is used in place of `getElementCount` on
`VectorType` instances. The tests guards for regressions on this
change.

The tests makes sure that calls to `llvm.masked.[gather|scatter]` are
still scalarized when 1. the intrinsics are operating on NEON sized IR
vectors, and 2. the compiler is not targeting fixed length SVE code
generation.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86249

Files:
  llvm/lib/IR/Function.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
  llvm/test/CodeGen/AArch64/llvm-masked-gather-legal-for-sve.ll
  llvm/test/CodeGen/AArch64/llvm-masked-scatter-legal-for-sve.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86249.286669.patch
Type: text/x-patch
Size: 9296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200819/b21a0a72/attachment.bin>


More information about the llvm-commits mailing list