[X86] SimplifyDemandedVectorElts - attempt to recombine target shuffle using Demanded...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 13 Aug 2019 10:51:39 +0000 (10:51 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 13 Aug 2019 10:51:39 +0000 (10:51 +0000)
commit1a8d790cf5f89c1df718844f13e934e39bef6ef5
tree31817f539c43873765d44b88f6733dd72932e5d7
parentdc06b0bc9ad055d06535462d91bfc2a744b2f589
[X86] SimplifyDemandedVectorElts - attempt to recombine target shuffle using DemandedElts mask (reapplied)

If we don't demand all elements, then attempt to combine to a simpler shuffle.

At the moment we can only do this if Depth == 0 as combineX86ShufflesRecursively uses Depth to track whether the shuffle has really changed or not - we'll need to change this before we can properly start merging combineX86ShufflesRecursively into SimplifyDemandedVectorElts.

The insertps-combine.ll regression is because XFormVExtractWithShuffleIntoLoad can't see through shuffles of different widths - this will be fixed in a follow-up commit.

Reapplying this as rL368307 had to be reverted as part of rL368660 to revert rL368276

llvm-svn: 368662
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512-intrinsics-fast-isel.ll
llvm/test/CodeGen/X86/insertps-combine.ll
llvm/test/CodeGen/X86/shrink_vmul.ll
llvm/test/CodeGen/X86/vec_smulo.ll
llvm/test/CodeGen/X86/vec_umulo.ll