diff options
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index a1bd7e8..69ed69c 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); + } } |