Index: test/cctest/compiler/test-run-inlining.cc |
diff --git a/test/cctest/compiler/test-run-inlining.cc b/test/cctest/compiler/test-run-inlining.cc |
index 5e5b604b1da645ca1c0a6a8e59f62bbab98cd319..e33e2a13109487a5b1172474690aa8c8b96093e8 100644 |
--- a/test/cctest/compiler/test-run-inlining.cc |
+++ b/test/cctest/compiler/test-run-inlining.cc |
@@ -164,31 +164,32 @@ TEST(InlineTwiceDependentDiamond) { |
FLAG_turbo_inlining = true; |
FunctionTester T( |
"(function () {" |
- "function foo(s) { if (true) {" |
- " return 12 } else { return 13; } };" |
- "function bar(s,t) { return foo(foo(1)); };" |
+ "var x = 41;" |
+ "function foo(s) { AssertStackDepth(1); if (s % 2 == 0) {" |
+ " return x - s } else { return x + s; } };" |
+ "function bar(s,t) { return foo(foo(s)); };" |
"return bar;" |
"})();"); |
InstallAssertStackDepthHelper(CcTest::isolate()); |
- T.CheckCall(T.Val(12), T.undefined(), T.undefined()); |
+ T.CheckCall(T.Val(-11), T.Val(11), T.Val(4)); |
} |
-TEST(InlineTwiceDependentDiamondReal) { |
+TEST(InlineTwiceDependentDiamondDifferent) { |
FLAG_context_specialization = true; |
FLAG_turbo_inlining = true; |
FunctionTester T( |
"(function () {" |
"var x = 41;" |
- "function foo(s) { AssertStackDepth(1); if (s % 2 == 0) {" |
- " return x - s } else { return x + s; } };" |
- "function bar(s,t) { return foo(foo(s)); };" |
+ "function foo(s,t) { AssertStackDepth(1); if (s % 2 == 0) {" |
+ " return x - s * t } else { return x + s * t; } };" |
+ "function bar(s,t) { return foo(foo(s, 3), 5); };" |
"return bar;" |
"})();"); |
InstallAssertStackDepthHelper(CcTest::isolate()); |
- T.CheckCall(T.Val(-11), T.Val(11), T.Val(4)); |
+ T.CheckCall(T.Val(-329), T.Val(11), T.Val(4)); |
} |
#endif // V8_TURBOFAN_TARGET |