From: Chris Lattner Date: Wed, 21 Dec 2005 18:02:52 +0000 (+0000) Subject: fix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=83397363348662e9352455ea1e6e88e7026300a4;p=oota-llvm.git fix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing vectors) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24905 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index a1bd7e832f8..69ed69cc643 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3827,9 +3827,12 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){ std::make_pair(Lo, Hi))).second; assert(isNew && "Value already expanded?!?"); - // Make sure the resultant values have been legalized themselves. - Lo = LegalizeOp(Lo); - Hi = LegalizeOp(Hi); + // Make sure the resultant values have been legalized themselves, unless this + // is a type that requires multi-step expansion. + if (getTypeAction(NVT) != Expand && NVT != MVT::isVoid) { + Lo = LegalizeOp(Lo); + Hi = LegalizeOp(Hi); + } }