[X86][TLI] SimplifyDemandedVectorEltsForTargetNode(): don't break apart broadcasts...
authorRoman Lebedev <lebedev.ri@gmail.com>
Sun, 19 Sep 2021 14:38:32 +0000 (17:38 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sun, 19 Sep 2021 14:38:32 +0000 (17:38 +0300)
commit5f2fe48d06c742872804da8b3d86596ed2bb9acb
tree58257e86c8a632b83e00261c1f1100a29f761267
parent07f1d8f0caa1516e0d97616adfea4aa94f7883a4
[X86][TLI] SimplifyDemandedVectorEltsForTargetNode(): don't break apart broadcasts from which not just the 0'th elt is demanded

Apparently this has no test coverage before D108382,
but D108382 itself shows a few regressions that this fixes.

It doesn't seem worthwhile breaking apart broadcasts,
assuming we want the broadcasted value to be preset in several elements,
not just the 0'th one.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D108411
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/copy-low-subvec-elt-to-high-subvec-elt.ll
llvm/test/CodeGen/X86/horizontal-sum.ll
llvm/test/CodeGen/X86/sse41.ll