do not set the root to null if an argument is dead
authorChris Lattner <sabre@nondot.org>
Sat, 9 Apr 2005 21:23:24 +0000 (21:23 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 9 Apr 2005 21:23:24 +0000 (21:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21188 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCISelPattern.cpp

index 566d79bade9e1c304b5b45b34c4a16c0764f16ef..44e041a8ba5eb07b0fa641fa76202d68b2d3e215 100644 (file)
@@ -203,8 +203,9 @@ PPC32TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
       GPR_idx += delta;
     }
     ArgOffset += ObjSize;
+    if (newroot.Val)
+      DAG.setRoot(newroot.getValue(1));
     
-    DAG.setRoot(newroot.getValue(1));
     ArgValues.push_back(argt);
   }