fix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing...
authorChris Lattner <sabre@nondot.org>
Wed, 21 Dec 2005 18:02:52 +0000 (18:02 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 21 Dec 2005 18:02:52 +0000 (18:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24905 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index a1bd7e832f862b5b145f5c200d24d48b7ffb6014..69ed69cc643422b184a1cc8233069160556a5326 100644 (file)
@@ -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);
+  }
 }