diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-12-28 17:43:22 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-12-28 17:43:22 -0800 |
commit | f0d47bd575a8c7ca758718ff0e6e5763f936dd6d (patch) | |
tree | b1f9667fe69a275ed033cde6b504830920041c38 /tools/test-js-optimizer-t2.js | |
parent | 995e37ebc0a6a4906dd8dcd0a05f664ddd6dbaf1 (diff) |
fix bug in optimizeShifts with not fixing the shift of X = needsShift
Diffstat (limited to 'tools/test-js-optimizer-t2.js')
-rw-r--r-- | tools/test-js-optimizer-t2.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/test-js-optimizer-t2.js b/tools/test-js-optimizer-t2.js index 18673bc7..3afdbc3d 100644 --- a/tools/test-js-optimizer-t2.js +++ b/tools/test-js-optimizer-t2.js @@ -68,5 +68,15 @@ function shifty($id) { q($idx << 1 << 2); q(1 << $idx << 1); // Do not turn this into the slower 1 << $idx + 1 (which is identical though) print(INDENT + "Entering: _main" + "hi"); // this order should not be modified + pause(7); + var $tp = get('tp'); + q($tp >> 2); + q($tp >> 2); + q($tp >> 2); + HEAP32[$H400] = $tp; + HEAP32[$tp] = 5; + HEAP32[$tp >> 2] = 5; + HEAP32[HEAP[$tp >> 2]] = 5; + HEAP32[HEAP[$tp >> 2] >> 2] = 5; } // EMSCRIPTEN_GENERATED_FUNCTIONS: ["shifty"] |