From 97c2073270e59efd966e9fe1c9b6697cc863d680 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 3 Apr 2006 17:29:28 +0000 Subject: [PATCH] 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 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } }