[llvm] [IR] Split vector.splice into vector.splice.left and vector.splice.right (PR #170796)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 12 09:52:33 PST 2025


paulwalker-arm wrote:

> From a frontend/middle-end perspective left/right is consistent with how vectors and arrays are written in textual LLVM IR/C.

This is what I get stuck on when trying to propose an alternative.  I feel the LangRef already defined vector index 0 as the left most and thus when building/joining vectors, you do so by adding elements to the right.

I guess you could use low/high to keep everything in the domain of indices? For example:
`splice.low(A, B, C)` - "concatenates two vectors, rotates the result until the C lowest indexed elements become the C highest indexed elements, then returns the low half"
`splice.high(A, B, C)` - "concatenates two vectors, rotates the result until the C highest indexed elements become the C lowest indexed elements, then returns the high half"

I don't know if that's being convoluted or whether I just like left/right because it fits my mental model.


https://github.com/llvm/llvm-project/pull/170796


More information about the llvm-commits mailing list