1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/ion/bug754713-2.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +// Don't eliminate a phi if it has no SSA uses but its value is still 1.5 +// observable in the interpreter. 1.6 +var t1 = 100; 1.7 +function test1(x) { 1.8 + // g(x) is inlined with --ion-eager, but don't mark the phi 1.9 + // for x as unused. 1.10 + for (var i = 0; i < 90; i++) { 1.11 + f1(x); 1.12 + if (i >= 80) 1.13 + t1; 1.14 + } 1.15 +} 1.16 + 1.17 +function f1(x) {}; 1.18 +test1(2); 1.19 + 1.20 +var t2 = 100; 1.21 +function test2(g) { 1.22 + // g(x) is inlined with --ion-eager, but don't mark the phi 1.23 + // for g as unused. 1.24 + for (var i = 0; i < 90; i++) { 1.25 + g(); 1.26 + if (i >= 80) 1.27 + t2; 1.28 + } 1.29 +} 1.30 + 1.31 +function f2() {}; 1.32 +test2(f2);