diff options
author | Ryan Kelly <ryan@rfk.id.au> | 2014-05-20 15:17:18 +1000 |
---|---|---|
committer | Ryan Kelly <ryan@rfk.id.au> | 2014-05-20 15:17:18 +1000 |
commit | 751756ddffdbdf8061b4b73ac6848c0a1f5e61b7 (patch) | |
tree | e843256a528a9c1abaeac19019af0a66fa7465b6 /tools/test-js-optimizer-asm-regs-harder-output.js | |
parent | 16d6cb35b4f1a78b1c435999f4081bdc0c566ac8 (diff) |
Fix elimination of conditional expressions in registerizeHarder.
Previously, attempts to eliminate a side-effect-free conditional
expression would corrupt internal block state, because the sub-nodes
belong to a different block than the one containing the expression.
This fixes the problem by not splitting side-effect free conditionals
across multiple blocks.
Diffstat (limited to 'tools/test-js-optimizer-asm-regs-harder-output.js')
-rw-r--r-- | tools/test-js-optimizer-asm-regs-harder-output.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/test-js-optimizer-asm-regs-harder-output.js b/tools/test-js-optimizer-asm-regs-harder-output.js index e1df42cb..c3b326f6 100644 --- a/tools/test-js-optimizer-asm-regs-harder-output.js +++ b/tools/test-js-optimizer-asm-regs-harder-output.js @@ -129,4 +129,9 @@ function linkedVars() { } return i2 + i1; } +function deadCondExpr(i2) { + i2 = i2 | 0; + var i1 = 0; + return i1 | 0; +} |