[llvm] [SLP]Model single unique value insert + shuffle as splat + select, where profitable (PR #136590)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 21 11:26:06 PDT 2025
alexey-bataev wrote:
> Did you evaluate this alternative?
>
> ```
> %bv = insertelement poison, %v, 0
> %res = shuffle %vec, %splat, <0, 1, 2,..., VF, pos1 + 1, .., VF,...>
> ```
>
> This isn't an explicit broadcast, but I'd suspect the TTI could reasonable recognize this for e.g. a vmerge.vxm on RISCV.
>
> The form chosen here is also reasonable, so don't feel the need to switch course, I'm just asking for my own education.
I can switch to this modelling, if you prefer it
https://github.com/llvm/llvm-project/pull/136590
More information about the llvm-commits
mailing list