diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-20 16:02:42 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-20 16:02:42 -0700 |
commit | 6f8af49c568abfb3b4203f1d3dc95e12fe573986 (patch) | |
tree | 5694a8ac1f6ab81aa0304e4701a4d5cdd2e3bffe /tools/test-js-optimizer-asm-pre-output.js | |
parent | 31872fbd01ca23962d954ca40232c7b8bfde58fe (diff) |
optimize HEAPU?8[..] << 24 >> 24 and similar
Diffstat (limited to 'tools/test-js-optimizer-asm-pre-output.js')
-rw-r--r-- | tools/test-js-optimizer-asm-pre-output.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/test-js-optimizer-asm-pre-output.js b/tools/test-js-optimizer-asm-pre-output.js index 53619c84..72608aa8 100644 --- a/tools/test-js-optimizer-asm-pre-output.js +++ b/tools/test-js-optimizer-asm-pre-output.js @@ -73,4 +73,24 @@ function retf() { } return +0; } +function i32_8() { + if ((HEAP8[$4 & 16777215] | 0) == 0) { + print(5); + } + if ((HEAP8[$5 & 16777215] | 0) == 0) { + print(5); + } + if ((HEAP8[$6 & 16777215] | 0) == 0) { + print(5); + } + if ((HEAP8[$7 & 16777215] | 0) == 0) { + print(5); + } + if (HEAPU8[$8 & 16777215] << 24 >> 16 == 0) { + print(5); + } + if (HEAPU8[$9 & 16777215] << 16 >> 16 == 0) { + print(5); + } +} |