[llvm] [IR] Add llvm.vector.[de]interleave{4,6,8} (PR #139893)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 16:23:04 PDT 2025


mshockwave wrote:

> Another option we could explore is to split deinterleaveN into N calls to an intrinsic for the form "deinterleave(N, Vec)

I guess you mean instead of
```
%d = deinterleave3(%v)
%s0 = extractvalue %d, 0
%s1 = extractvalue %d, 1
%s2 = extractvalue %d, 2
```
We're going to do something like
```
%s0 = deinterleave(0, %v)
%s1 = deinterleave(1, %v)
%s2 = deinterleave(2, %v)
```

I guess a potential problem might happen when we _cannot_ turn this into segmented load/store. For instance, how should we codegen a single, lingering `%s = deinterleave(X, %v)`? We might be able to mitigate it by adding another argument indicating the total number of fields, like `%s0 = deinterleave(0, 3, %v)` for the first field when NF = 3.

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


More information about the llvm-commits mailing list