[DAG] Improved target independent vector shuffle folding logic.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Sat, 15 Nov 2014 22:56:25 +0000 (22:56 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Sat, 15 Nov 2014 22:56:25 +0000 (22:56 +0000)
commit37f645cb34590ccb20717a914240a0b435b8103c
tree58b5030128dfd373a2614d93f46486daa80b90df
parent01e39346f33d19473d5586a11624d2ab094c7f8b
[DAG] Improved target independent vector shuffle folding logic.

This patch teaches the DAGCombiner how to combine shuffles according to rules:
   shuffle(shuffle(A, Undef, M0), B, M1) -> shuffle(B, A, M2)
   shuffle(shuffle(A, B, M0), B, M1) -> shuffle(B, A, M2)
   shuffle(shuffle(A, B, M0), A, M1) -> shuffle(B, A, M2)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222090 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/vector-shuffle-combining.ll