Add VSELECT to LegalizeVectorTypes::ScalariseVectorResult. Previously it would crash...
authorPete Cooper <peter_cooper@apple.com>
Tue, 3 Apr 2012 22:57:55 +0000 (22:57 +0000)
committerPete Cooper <peter_cooper@apple.com>
Tue, 3 Apr 2012 22:57:55 +0000 (22:57 +0000)
commit2ce63c73520cd6e715f9114589f802938b5db01f
tree894de6caa1343d4b049aeb841d4fd30133fe15a3
parentdda3a099a096588d435fdb855b52b0a203316de2
Add VSELECT to LegalizeVectorTypes::ScalariseVectorResult.  Previously it would crash if it encountered a 1 element VSELECT.  Solution is slightly more complicated than just creating a SELET as we have to mask or sign extend the vector condition if it had different boolean contents from the scalar condition.  Fixes <rdar://problem/11178095>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153976 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/Generic/select.ll