[X86] getShuffleScalarElt - add CONCAT_VECTORS/INSERT_VECTOR_ELT support.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 6 May 2020 17:13:17 +0000 (18:13 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 6 May 2020 17:13:33 +0000 (18:13 +0100)
commit8817334ce3c71bf4c087adde60e11c7fe0aaceba
treeb15205c2f68460ade48ff175d014578ab2d4048c
parent8c71c2291e81b1348fdedbda7e7600c5c2eeed7c
[X86] getShuffleScalarElt - add CONCAT_VECTORS/INSERT_VECTOR_ELT support.

This helped fix some i686 vXi64 broadcast folds that were becoming v2Xi32 broadcasts because we didn't match the broadcast until after SimplifyDemandedBits worked out we only used the bottom 32-bits in PMUL(U)DQ and type legalization had split the original i64 load.

A couple of regressions occurred which required some fixups - adding concat_vectors(broadcast_load,broadcast_load) splat support and recognising (unnecessary) unary shuffles of already broadcasted vectors.

This came about as part of the work investigating vector load combining from shuffles for PR42550.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512-intrinsics-upgrade.ll
llvm/test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll