aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer-t2.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-28 17:43:22 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-28 17:43:22 -0800
commitf0d47bd575a8c7ca758718ff0e6e5763f936dd6d (patch)
treeb1f9667fe69a275ed033cde6b504830920041c38 /tools/test-js-optimizer-t2.js
parent995e37ebc0a6a4906dd8dcd0a05f664ddd6dbaf1 (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.js10
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"]