Index: test/cctest/compiler/test-run-deopt.cc |
diff --git a/test/cctest/compiler/test-run-deopt.cc b/test/cctest/compiler/test-run-deopt.cc |
index dbf3dfb8eb236b08bb5864804009f74c2ee7065f..02771d4cadbf2a18c8e0ef871be1db3727a52011 100644 |
--- a/test/cctest/compiler/test-run-deopt.cc |
+++ b/test/cctest/compiler/test-run-deopt.cc |
@@ -26,6 +26,23 @@ TEST(TurboSimpleDeopt) { |
} |
+TEST(TurboSimpleDeoptInExpr) { |
+ FLAG_allow_natives_syntax = true; |
+ FLAG_turbo_deoptimization = true; |
+ |
+ FunctionTester T( |
+ "(function f(a) {" |
+ "var b = 1;" |
+ "var c = 2;" |
+ "if (!%IsOptimized()) return 0;" |
+ "var d = b + (%DeoptimizeFunction(f), c);" |
+ "if (%IsOptimized()) return 0;" |
+ "return d + a; })"); |
+ |
+ T.CheckCall(T.Val(6), T.Val(3)); |
+} |
+ |
+ |
TEST(TurboTrivialDeopt) { |
FLAG_allow_natives_syntax = true; |
FLAG_turbo_deoptimization = true; |