diff options
author | Dan Gohman <gohman@apple.com> | 2007-10-29 20:44:42 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-10-29 20:44:42 +0000 |
commit | 090b38a0dafbdad144db1e2c5c9db082eb7dc9fe (patch) | |
tree | 80419ddf7ecb5453c2e08d1b536c37410576c3f4 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | a8cc4d3d3c71d260e454ee2c7e762b956b529091 (diff) |
Fix a DAGCombiner abort on a bitcast from a scalar to a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index b4299f4ff8..b423d68e0f 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -4212,7 +4212,8 @@ SDOperand DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) { unsigned NumElts = MVT::getVectorNumElements(VT); if (InVec.getOpcode() == ISD::BIT_CONVERT) { MVT::ValueType BCVT = InVec.getOperand(0).getValueType(); - if (NumElts != MVT::getVectorNumElements(BCVT)) + if (!MVT::isVector(BCVT) || + NumElts != MVT::getVectorNumElements(BCVT)) return SDOperand(); InVec = InVec.getOperand(0); EVT = MVT::getVectorElementType(BCVT); |