Do not check stmts after the tail call candidate if the optimization has been aborted...
authorSergey Andreenko <seandree@microsoft.com>
Fri, 17 Nov 2017 02:48:18 +0000 (18:48 -0800)
committerGitHub <noreply@github.com>
Fri, 17 Nov 2017 02:48:18 +0000 (18:48 -0800)
Fix #15056

src/jit/morph.cpp

index 2701d61..b8ce7a8 100644 (file)
@@ -8478,9 +8478,12 @@ GenTreePtr Compiler::fgMorphCall(GenTreeCall* call)
         }
 #endif // FEATURE_PAL
 
-        if (!fgCheckStmtAfterTailCall())
+        if (szFailReason == nullptr)
         {
-            szFailReason = "Unexpected statements after the tail call";
+            if (!fgCheckStmtAfterTailCall())
+            {
+                szFailReason = "Unexpected statements after the tail call";
+            }
         }
 
         if (szFailReason != nullptr)