[DAGCombine] A shuffle of a splat is always the splat itself
authorZvi Rackover <zvi.rackover@intel.com>
Thu, 30 Mar 2017 01:42:57 +0000 (01:42 +0000)
committerZvi Rackover <zvi.rackover@intel.com>
Thu, 30 Mar 2017 01:42:57 +0000 (01:42 +0000)
commit7569436f8119931dc817b018bd8380ef7e56c056
tree110e8b98e71f541282281fd5ff15a89de7362d6a
parentd7d1d517ee13d8fad6279de29f236295bef10b58
[DAGCombine]  A shuffle of a splat is always the splat itself

Summary:
Add a simplification:
shuffle (splat-shuffle), undef, M --> splat-shuffle

Fixes pr32449

Patch by Sanjay Patel

Reviewers: eli.friedman, RKSimon, spatel

Reviewed By: spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D31426

llvm-svn: 299047
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/shuffle-of-splat-multiuses.ll