[DAG] Check in advance if a build_vector has a legal type before attempting to conver...
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 30 Sep 2014 15:30:22 +0000 (15:30 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 30 Sep 2014 15:30:22 +0000 (15:30 +0000)
commit9e6df85d39801879cf8d7e053861e56a1c220092
treec7654aa792c2133bcf282c103542d6b4bb2fa1ce
parenta66e3bbf7a25ed04cca3dfc576d48c61a5feb742
[DAG] Check in advance if a build_vector has a legal type before attempting to convert it into a shuffle.

Currently, the DAG Combiner only tries to convert type-legal build_vector nodes
into shuffles. This patch simply moves the logic that checks if a
build_vector has a legal value type up before we even start analyzing the
operands. This allows to early exit immediately from method
'visitBUILD_VECTOR' if the node type is known to be illegal.

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218677 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp