[DAG] Allow build-to-shuffle combine to combine builds from two wide vectors.
authorMichael Kuperstein <mkuper@google.com>
Tue, 13 Sep 2016 21:53:32 +0000 (21:53 +0000)
committerMichael Kuperstein <mkuper@google.com>
Tue, 13 Sep 2016 21:53:32 +0000 (21:53 +0000)
commit59f830530557f25ab6bda5cc5c1401ea127b6f4d
tree3c46c08d9d9c6bc2a7191068b0605974c44203fa
parentfc19fa3721927159a1ad7a6767d94b96c841ec03
[DAG] Allow build-to-shuffle combine to combine builds from two wide vectors.

This allows us to, in some cases, create a vector_shuffle out of a build_vector, when
the inputs to the build are extract_elements from two different vectors, at least one
of which is wider than the output. (E.g. a <8 x i16> being constructed out of
elements from a <16 x i16> and a <8 x i16>).

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

llvm-svn: 281402
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/oddshuffles.ll