When we're at the stack depth we want, there isn't anything to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64095 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index 5072d63..4c634ef 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -199,6 +199,10 @@
 }
 
 bool CodeGenFunction::EmitStackUpdate(llvm::Value *V) {
+  // If we're already at the depth we want...
+  if (StackDepth == V)
+    return false;
+
   // V can be 0 here, if it is, be sure to start searching from the
   // top of the function, as we want the next save after that point.
   for (unsigned int i = 0; i < StackSaveValues.size(); ++i)