summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-10-29 20:44:42 +0000
committerDan Gohman <gohman@apple.com>2007-10-29 20:44:42 +0000
commitae95d72a5296961cc4ec04cc87c3753653f6f3b1 (patch)
tree76ffd76ab64979cc27adf0eb8950f994fdb038ff /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent6d845f04142e6195374c79a334a05859d91c252f (diff)
downloadbcm5719-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.cpp3
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);
OpenPOWER on IntegriCloud