[DAGCombine] Fix a bug in a BUILD_VECTOR combine
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 4 Mar 2015 07:27:39 +0000 (07:27 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 4 Mar 2015 07:27:39 +0000 (07:27 +0000)
commitbbfda9c1254bdd95d9705a5d7f82e254e689bba2
tree5d3c19d3b431f4512eb727a3b734918860919779
parent4e942d63c06358cadd49f49d0db9011928f53719
[DAGCombine] Fix a bug in a BUILD_VECTOR combine

When trying to convert a BUILD_VECTOR into a shuffle, we try to split a single source vector that is twice as wide as the destination vector.
We can not do this when we also need the zero vector to create a blend.
This fixes PR22774.

Differential Revision: http://reviews.llvm.org/D8040

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