From: Chris Lattner Date: Mon, 3 Apr 2006 17:29:28 +0000 (+0000) Subject: Add a missing check, this fixes UnitTests/Vector/sumarray.c X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=97c2073270e59efd966e9fe1c9b6697cc863d680;p=oota-llvm.git Add a missing check, this fixes UnitTests/Vector/sumarray.c git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27375 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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); } }