Fix bugs lowering stackrestore, fixing 2004-08-12-InlinerAndAllocas.c on
authorChris Lattner <sabre@nondot.org>
Mon, 23 Jan 2006 05:22:07 +0000 (05:22 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 23 Jan 2006 05:22:07 +0000 (05:22 +0000)
PPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25522 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 441311cc06e2b64f7f5842e8c840800b548258bb..7e20f091b22134131c5a3afa179bb9ae7e7e0293 100644 (file)
@@ -1043,10 +1043,11 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
     DAG.setRoot(Tmp.getValue(1));
     return 0;
   }
-  case Intrinsic::stackrestore:
-    DAG.setRoot(DAG.getNode(ISD::STACKRESTORE, MVT::Other, DAG.getRoot(),
-                            getValue(I.getOperand(1))));
+  case Intrinsic::stackrestore: {
+    SDOperand Tmp = getValue(I.getOperand(1));
+    DAG.setRoot(DAG.getNode(ISD::STACKRESTORE, MVT::Other, getRoot(), Tmp));
     return 0;
+  }
   case Intrinsic::prefetch:
     // FIXME: Currently discarding prefetches.
     return 0;