[llvm] [InstCombine] Scalarize `(vec_ops (insert ?, X, Idx))` when only one element is demanded (PR #84645)

via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 10 13:30:38 PDT 2024


goldsteinn wrote:

> > Are you saying that SLP is creating these vectorizations but shouldn't? Isnt that a cost issue with the alt opcode cases?
> 
> Does not look like cost issue, looks like a corner case that should be handled separately in SLP. We have some kind of it already, but not all. There is something similar with sext/zext/trunc, I'm going to fix later, since it requires some extra stuff in minbitwidth analysis. This one should not require extra work, just need to automatically create gather node for 2-element altshuffle, if we see that the operand is going to be gather/buildvector node. Can do it tomorrow.

Thanks :)

Ill close this once your patch goes up.

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


More information about the llvm-commits mailing list