js/src/jit-test/tests/ion/bug754713-2.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:bb2ed5d912b0
1 // Don't eliminate a phi if it has no SSA uses but its value is still
2 // observable in the interpreter.
3 var t1 = 100;
4 function test1(x) {
5 // g(x) is inlined with --ion-eager, but don't mark the phi
6 // for x as unused.
7 for (var i = 0; i < 90; i++) {
8 f1(x);
9 if (i >= 80)
10 t1;
11 }
12 }
13
14 function f1(x) {};
15 test1(2);
16
17 var t2 = 100;
18 function test2(g) {
19 // g(x) is inlined with --ion-eager, but don't mark the phi
20 // for g as unused.
21 for (var i = 0; i < 90; i++) {
22 g();
23 if (i >= 80)
24 t2;
25 }
26 }
27
28 function f2() {};
29 test2(f2);

mercurial