Fix PR12000. Some vector operations may use scalar operands with types
authorNadav Rotem <nadav.rotem@intel.com>
Tue, 14 Feb 2012 13:06:32 +0000 (13:06 +0000)
committerNadav Rotem <nadav.rotem@intel.com>
Tue, 14 Feb 2012 13:06:32 +0000 (13:06 +0000)
commit8b7c3d0ee42938a9e6ca37239cc327bd9f4c0cd0
treeafd4a12dfe863553c70e722a39a07707d7b08198
parentfc52a5232300c27d57a8a9b6cd4b8cdd5d51127a
Fix PR12000. Some vector operations may use scalar operands with types
that are greater than the vector element type. For example BUILD_VECTOR
of type <1 x i1> with a constant i8 operand.
This patch fixes the assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150477 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
test/CodeGen/X86/2012-02-14-scalar.ll [new file with mode: 0644]