diff options
author | Alon Zakai <azakai@google.com> | 2022-09-09 08:53:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 08:53:25 -0700 |
commit | 1e8eb596f82e438216b51972f90e10b4fc13b96a (patch) | |
tree | bc67784520f16d70eea19e89cb467a5f2c8d34d5 /test/lit/help/wasm2js.test | |
parent | d4d33b1e175c962548347c59339783c11d5d1a23 (diff) | |
download | binaryen-1e8eb596f82e438216b51972f90e10b4fc13b96a.tar.gz binaryen-1e8eb596f82e438216b51972f90e10b4fc13b96a.tar.bz2 binaryen-1e8eb596f82e438216b51972f90e10b4fc13b96a.zip |
OptimizeInstructions: Optimize comparisons with an added offset (#5025)
E.g.
x + C1 > C2 ==> x > (C2-C1)
We do need to be careful of overflows in either the add on the left or
the proposed subtract on the right. In the latter case, we can at least do
x + C1 > C2 ==> x + (C1-C2) > 0
Helps #5008 (but more patterns remain).
Found by the superoptimizer #4994. This was the top suggestion for Java and Dart.
Diffstat (limited to 'test/lit/help/wasm2js.test')
0 files changed, 0 insertions, 0 deletions