[llvm] [SLP]Model single unique value insert + shuffle as splat + select, where profitable (PR #136590)
    Philip Reames via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Apr 21 11:21:28 PDT 2025
    
    
  
preames 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.  
https://github.com/llvm/llvm-project/pull/136590
    
    
More information about the llvm-commits
mailing list