[X86] Fold scalar_to_vector(i64 zext(x)) -> bitcast(vzext_movl(scalar_to_vector(i32...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 21 Oct 2022 09:39:57 +0000 (10:39 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 21 Oct 2022 09:40:13 +0000 (10:40 +0100)
commit5ca77541446d7040638b53e0ddff3f76ee005681
treedcb14b0b789f6d662985ae77445cd163ef103296
parentdaf067da04c98ce666f67ba2b3beed4cf4be7549
[X86] Fold scalar_to_vector(i64 zext(x)) -> bitcast(vzext_movl(scalar_to_vector(i32 x)))

Extends existing anyextend fold to make use of the implicit zero-extension of the movd instruction

This also helps replace some nasty xmm->gpr->xmm traffic with a shuffle pattern instead

Noticed while looking at D130953
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/buildvec-extract.ll
llvm/test/CodeGen/X86/combine-pmuldq.ll
llvm/test/CodeGen/X86/fast-isel-bitcast-crash.ll
llvm/test/CodeGen/X86/gather-addresses.ll
llvm/test/CodeGen/X86/insertelement-var-index.ll
llvm/test/CodeGen/X86/load-scalar-as-vector.ll
llvm/test/CodeGen/X86/vec_insert-7.ll
llvm/test/CodeGen/X86/vec_set-B.ll
llvm/test/CodeGen/X86/vector-shuffle-combining-xop.ll