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 | ae95d72a5296961cc4ec04cc87c3753653f6f3b1 (patch) | |
| tree | 76ffd76ab64979cc27adf0eb8950f994fdb038ff /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
| parent | 6d845f04142e6195374c79a334a05859d91c252f (diff) | |
| download | bcm5719-llvm-ae95d72a5296961cc4ec04cc87c3753653f6f3b1.tar.gz bcm5719-llvm-ae95d72a5296961cc4ec04cc87c3753653f6f3b1.zip | |
Fix a DAGCombiner abort on a bitcast from a scalar to a vector.
llvm-svn: 43470
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index b4299f4ff85..b423d68e0f0 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/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); |

