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

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 07:53:16 PST 2022


sdesmalen added inline comments.


================
Comment at: llvm/docs/LangRef.rst:17224-17227
+of elements in the source/result vector. For fixed length vectors of type
+<N x ElTy> this is simply N, whereas for scalable vectors of type
+<vscale x N x ElTy> VL is N multiplied by the minimum value specified in the
+vscale_range() attribute. The ``imm`` is a signed integer constant in the range
----------------
I don't think this is entirely right. What I think you want to say is:

> The first two operands are vectors with the same type. The start index is `imm` modulo the runtime number of elements in the source vector.
> For a fixed-width vector `<N x eltty>`, `imm` is a signed integer constant in the range `-N <= imm < N`.
> For a scalable vector `<vscale x N x eltty>`, `imm` is a signed integer constant in the range `-X <= imm < X` where `X=vscale_range_min * N`.



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115933/new/

https://reviews.llvm.org/D115933



More information about the llvm-commits mailing list