diff options
author | Max Graey <maxgraey@gmail.com> | 2020-11-11 01:56:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 15:56:14 -0800 |
commit | bb124f995527f650d98bdac30b00b125b76fab9c (patch) | |
tree | 05c63599a575cf40b1aff5ed5c4da7211324bb28 /test/wasm2js | |
parent | 236296d8563e0f90c3b57f32f1f8f63bac414b89 (diff) | |
download | binaryen-bb124f995527f650d98bdac30b00b125b76fab9c.tar.gz binaryen-bb124f995527f650d98bdac30b00b125b76fab9c.tar.bz2 binaryen-bb124f995527f650d98bdac30b00b125b76fab9c.zip |
Optimize i32(x) % C_pot in boolean context (#3307)
bool(i32(x) % C_pot) -> bool(i32(x) & (C_pot - 1))
bool(i32(x) % min_s) -> bool(i32(x) & max_s)
For all other situations we already do this for (i32|i64).rem_s
Diffstat (limited to 'test/wasm2js')
0 files changed, 0 insertions, 0 deletions