diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index aacee99ed99..c982e5be8fc 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -2017,8 +2017,8 @@ SDOperand DAGCombiner::visitVBIT_CONVERT(SDNode *N) { break; } - if (isSimple) { - MVT::ValueType DestEltVT = cast(N->getOperand(2))->getVT(); + MVT::ValueType DestEltVT = cast(N->getOperand(2))->getVT(); + if (isSimple && !MVT::isVector(DestEltVT)) { return ConstantFoldVBIT_CONVERTofVBUILD_VECTOR(N0.Val, DestEltVT); } }