[llvm] [LegalizeTypes][X86][PowerPC] Use shift by 1 instead of adding a value to itself to double. (PR #86857)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 13:14:37 PDT 2024


efriedma-quic wrote:

If you really care about the x86 codegen for that testcase, there's a bigger issue here: we store/load from the stack twice for a single insertelement.

(Or we could consider using a blend, like: `idx == <0,1,2,3> ? vec : splat(elt)`.  But I think that's more instructions, and I don't think the stall on the load is that expensive on x86.)

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


More information about the llvm-commits mailing list