[PATCH] D115933: [IR] Change vector.splice intrinsic to reject out-of-bounds indices

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 17 04:47:49 PST 2021


david-arm created this revision.
david-arm added reviewers: sdesmalen, CarolineConcatto, c-rhodes, craig.topper, frasercrmck.
Herald added subscribers: dexonsmith, jdoerfert, hiraditya.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

I've changed the definition of the experimental.vector.splice
instrinsic to reject indices that are known to be or possibly
out-of-bounds. In practice, this means changing the definition so that
the index is now only valid in the range [-VL, VL-1] where VL is the
known minimum vector length. We use the vscale_range attribute to
take the minimum vscale value into account so that we can permit
more indices when the attribute is present.

The splice intrinsic is currently only ever generated by the vectoriser,
which will never attempt to splice vectors with out-of-bounds values.
Changing the definition also makes things simpler for codegen since we
can always assume that the index is valid.

This patch was created in response to review comments on D115863 <https://reviews.llvm.org/D115863>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115933

Files:
  llvm/docs/LangRef.rst
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/test/CodeGen/AArch64/named-vector-shuffles-neon.ll
  llvm/test/CodeGen/AArch64/named-vector-shuffles-sve.ll
  llvm/test/Verifier/invalid-splice.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115933.395093.patch
Type: text/x-patch
Size: 28349 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211217/c02c4797/attachment.bin>


More information about the llvm-commits mailing list