diff options
author | Max Graey <maxgraey@gmail.com> | 2020-10-13 17:12:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-13 07:12:21 -0700 |
commit | 60cc473e57bb869761f753748af91dad2be4ae13 (patch) | |
tree | 1ff1302ab7f596ed95bcac779e146c20c7782339 /test/passes/optimize-instructions_optimize-level=2_all-features_ignore-implicit-traps.wast | |
parent | 689a6fc5fa03a969f099613cd85893332ecdb5e6 (diff) | |
download | binaryen-60cc473e57bb869761f753748af91dad2be4ae13.tar.gz binaryen-60cc473e57bb869761f753748af91dad2be4ae13.tar.bz2 binaryen-60cc473e57bb869761f753748af91dad2be4ae13.zip |
Optimize unsigned divisions when rhs is negative constant (#2991)
`(uint32_t)x / C` --> `x >= C`, where `C > 2^31`
`(uint32_t)x / -1` --> `x != -1`
and for `shrinkLevel == 0`:
`(uint64_t)x / C` --> `uint64_t(x >= C)`, where `C > 2^63`
`(uint64_t)x / -1` --> `x != -1`
Diffstat (limited to 'test/passes/optimize-instructions_optimize-level=2_all-features_ignore-implicit-traps.wast')
0 files changed, 0 insertions, 0 deletions