diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/js-optimizer.js | 2 | ||||
-rw-r--r-- | tools/test-js-optimizer-asm-pre-output.js | 2 | ||||
-rw-r--r-- | tools/test-js-optimizer-asm-pre.js | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 678ba0d5..d79e8f23 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -753,7 +753,7 @@ function simplifyExpressions(ast) { // expensive | cheap can be turned into cheap ? 1 : expensive, // so that we can avoid the expensive computation, if it has no side effects. function conditionalize(ast) { - var MIN_COST = 4; + var MIN_COST = 7; traverse(ast, function(node, type) { if (type === 'if' || type === 'while') { var cond = node[1]; diff --git a/tools/test-js-optimizer-asm-pre-output.js b/tools/test-js-optimizer-asm-pre-output.js index ce45645c..d6a7a04b 100644 --- a/tools/test-js-optimizer-asm-pre-output.js +++ b/tools/test-js-optimizer-asm-pre-output.js @@ -593,7 +593,7 @@ function conditionalizeMe() { if ($sub$i480 >= Math_fround(+0) ? !($sub4$i483 >= Math_fround(HEAPF32[x + y | 0])) : 1) { b(); } - if (x > 10 ? 1 : HEAP[20] > 5) { + if (x > 10 | HEAP[20] + 2 > 5) { b(); } } diff --git a/tools/test-js-optimizer-asm-pre.js b/tools/test-js-optimizer-asm-pre.js index b9773bb5..f930fc13 100644 --- a/tools/test-js-optimizer-asm-pre.js +++ b/tools/test-js-optimizer-asm-pre.js @@ -605,7 +605,7 @@ function conditionalizeMe() { if (!($sub$i480 >= Math_fround(+0)) | !($sub4$i483 >= Math_fround(HEAPF32[x+y|0]))) { b(); } - if (x > 10 | HEAP[20] > 5) { + if (x > 10 | (HEAP[20] + 2) > 5) { b(); } } |