[llvm] [RISCV] Avoid early split for fixed-length VECTOR_DEINTERLEAVE (PR #226453)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 3 17:29:39 PDT 2026
aabhinavg1 wrote:
> I guess my high level concern is that from a software engineering perspective, this approach makes it a little more difficult to scale up in the future. Originally the lowering process is split into two phases: split ISD::VECTOR_DEINTERLEAVE if it violates the LMUL rule and generates sub-ISD::VECTOR_DEINTERLEAVE which will then be lowered recursively; the second phase can then focuses on their algorithms, including all kind of special lowerings (the code you updated here belong to the generic lowering of VECTOR_DEINTERLEAVE). This patch inserts generic lowering in the middle of the splitting code (i.e. phase 1), which means that any future special lowerings of VECTOR_DEINTERLEAVE either has to disable the generic lowering inserted in the middle of splitting, or duplicate their logics similar to what you're doing here. Otherwise those special lowerings would be overridden by the generic lowering inserted in the splitting. I feel like it might be less clean than I would hope, but perhaps I'm getting ahead of myself.
>
> P.S. the reason you're not overriding any special lowering is because all the special lowering we have now are for Factor=2, and if it's fixed vector + Factor=2, SelectionDAGBuilder does not use vector_deinterleave but use vector_shuffle. But again, this might change in the future.
Agreed. Fixed-length chunking is no longer inside the split.
Scalable vectors still split into smaller VECTOR_DEINTERLEAVE nodes. Fixed vectors fall through the special lowerings and use the generic store+vlseg path, in equal power-of-two chunks. Pushed in [66c15a31c358].
https://github.com/llvm/llvm-project/pull/226453
More information about the llvm-commits
mailing list