[DAGCombiner] Avoid introducing an illegal build_vector when folding a sign_extend.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 28 Jan 2014 12:53:56 +0000 (12:53 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 28 Jan 2014 12:53:56 +0000 (12:53 +0000)
commit5144469bb4a801c289e47377b9399aa685e5ce99
treee6ea9b1967733883f802fee4681ec456ffc4f349
parent510c731153e2938874217ebaa4d9b5c8a5985c00
[DAGCombiner] Avoid introducing an illegal build_vector when folding a sign_extend.

Make sure that we don't introduce illegal build_vector dag nodes
when trying to fold a sign_extend of a build_vector.

This fixes a regression introduced by r200234.
Added test CodeGen/X86/fold-vector-sext-crash.ll
to verify that llc no longer crashes with an assertion failure
due to an illegal build_vector of type MVT::v4i64.

Thanks to Ilia Filippov for spotting this regression and for
providing a reproducible test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200313 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/fold-vector-sext-crash.ll [new file with mode: 0644]