[llvm] [ConstantFolding] Add folding for [de]interleave2, insert and extract (PR #141301)

Nikolay Panchenko via llvm-commits llvm-commits at lists.llvm.org
Wed May 28 10:09:19 PDT 2025


npanchen wrote:

> These make sense to have, but I'm wondering if you were seeing any cases where we were using fixed length versions of these intrinsics. From my understanding these are only really used for scalable vectors in the loop vectorizer etc.
> 
> Maybe from the ComplexDeinterleaving pass?

Intrinsics I added here were explicitly generated from Mojo code. For example: https://github.com/modular/modular/blob/e7419034262164d41798b11876e40ca173bae28c/mojo/stdlib/stdlib/builtin/simd.mojo#L2328-L2332
There're several more that need to be needed, but it would be too much to put into a single PR.

I doubt LV can emit it, at least not with innermost loop vectorization. Perhaps SLP can do this.

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


More information about the llvm-commits mailing list