diff options
author | Max Graey <maxgraey@gmail.com> | 2021-10-27 02:17:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-26 23:17:33 +0000 |
commit | 2b24537425ada522d892c7180a06aedc1c94509e (patch) | |
tree | c2c08729c549a8ddb322ffb7c55c4a91c90cd9ca /test/binaryen.js | |
parent | 3907e07dee3ce2bd477d5c234cd7bdd6aa1294a2 (diff) | |
download | binaryen-2b24537425ada522d892c7180a06aedc1c94509e.tar.gz binaryen-2b24537425ada522d892c7180a06aedc1c94509e.tar.bz2 binaryen-2b24537425ada522d892c7180a06aedc1c94509e.zip |
[OptimizeInstructions] Canonicalize relational ops with near zero on rhs (#4272)
Canonicalize:
(signed)x > -1 ==> x >= 0
(signed)x <= -1 ==> x < 0
(signed)x < 1 ==> x <= 0
(signed)x >= 1 ==> x > 0
(unsigned)x < 1 ==> x == 0
(unsigned)x >= 1 ==> x != 0
This should help #4265, and in general 0 is usually a more
common constant, and reasonable to canonicalize to.
Diffstat (limited to 'test/binaryen.js')
0 files changed, 0 insertions, 0 deletions