diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-12-30 20:53:32 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-12-30 20:53:32 -0800 |
commit | 8268b5a015dff2d73c2e1e9a25ea68fd0b0bdc92 (patch) | |
tree | 02fa0fae61036376396e894315463dbe69c9d3aa /tools/test-js-optimizer-t2c.js | |
parent | 193225a93b88c6d3bc4d5b73cb9c1346029eb072 (diff) |
improve shift optimizer tests
Diffstat (limited to 'tools/test-js-optimizer-t2c.js')
-rw-r--r-- | tools/test-js-optimizer-t2c.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/test-js-optimizer-t2c.js b/tools/test-js-optimizer-t2c.js index 7b82777b..c5e76b63 100644 --- a/tools/test-js-optimizer-t2c.js +++ b/tools/test-js-optimizer-t2c.js @@ -5,5 +5,12 @@ function shifty() { var $ead_192394b = HEAP32[$pCur_addr + 116 + ($26 << 16 >> 16 << 2)]; $pPage2 = HEAP32[$pCur_addr + 116 + ($26 << 16 >> 16)]; var $ead_192394b = HEAP32[$pCur_addr + 116 + ($26 << 16 >> 16)]; + // We prefer to do additions then shifts, so the shift happens last, because the shift output is known to be 32-bit. So these should not change + q($13 + 8 >> 2); + q(28 + $13 >> 2); + q(48 + $13 + 12 >> 2); + q($13 + $15 + 12 >> 2); + q(HEAPF32[$output + ($j37 << 4) + 4 >> 2]); + q(5 + $13 + 8 << 2); } // EMSCRIPTEN_GENERATED_FUNCTIONS: ["shifty"] |