diff options
| author | Alon Zakai <alonzakai@gmail.com> | 2013-05-23 15:28:08 -0700 | 
|---|---|---|
| committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-23 15:28:08 -0700 | 
| commit | b90b3ea970f3cc65020730f33ff97c4f2bc2a860 (patch) | |
| tree | 87ef7d60b16d78d9796450c2607e32e141f60e4d /tools/test-js-optimizer-asm-pre.js | |
| parent | f6ab05e76cbb946bd35b35eaccfb7ae4567f6501 (diff) | |
| parent | a2b9c72b677a23aa665fca5ab9239a725040ca44 (diff) | |
Merge pull request #1204 from sunfishcode/incoming
Optimize (x&A)<<B>>B.
Diffstat (limited to 'tools/test-js-optimizer-asm-pre.js')
| -rw-r--r-- | tools/test-js-optimizer-asm-pre.js | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/tools/test-js-optimizer-asm-pre.js b/tools/test-js-optimizer-asm-pre.js index f2ffaef4..264587d2 100644 --- a/tools/test-js-optimizer-asm-pre.js +++ b/tools/test-js-optimizer-asm-pre.js @@ -95,4 +95,18 @@ function i32_8() {      print(5);    }  } +function sign_extension_simplification() { +  if ((HEAP8[$4 & 16777215] & 127) << 24 >> 24 == 0) { +    print(5); +  } +  if ((HEAP8[$4 & 16777215] & 128) << 24 >> 24 == 0) { +    print(5); +  } +  if ((HEAP32[$5 & 16777215] & 32767) << 16 >> 16 == 0) { +    print(5); +  } +  if ((HEAP32[$5 & 16777215] & 32768) << 16 >> 16 == 0) { +    print(5); +  } +}  // EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "rett", "ret2t", "retf", "i32_8"] | 
