summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-debug.cpp
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2020-09-17 20:31:27 +0300
committerGitHub <noreply@github.com>2020-09-17 10:31:27 -0700
commit9f7a053bf0ca3185336eb4616f88d85df573adbf (patch)
treed4cfd91bfeffb3864aae2d3d3cca1092129840d2 /src/wasm/wasm-debug.cpp
parentedc03a69da757e9b106b67647d7914b94680b97a (diff)
downloadbinaryen-9f7a053bf0ca3185336eb4616f88d85df573adbf.tar.gz
binaryen-9f7a053bf0ca3185336eb4616f88d85df573adbf.tar.bz2
binaryen-9f7a053bf0ca3185336eb4616f88d85df573adbf.zip
Unary and binary duplicate expression elimination (#3047)
Simplifies patterns in which an expression is applied twice to its operands. `abs(abs(x))` -> `abs(x)` `ceil(ceil(x))` -> `ceil(x)` `floor(floor(x))` -> `floor(x)` `trunc(trunc(x))` -> `trunc(x)` `nearest(nearest(x))` -> `nearest(x)` `eqz(eqz(bool(x)))` -> `bool(x)` `sext(sext(x))` -> `sext(x)` `neg(neg(x))` -> `x` `y - (y - x)` -> `x` `(x ^ y) ^ y` -> `x` `(x | y) | y` -> `x | y` `(x & y) & y` -> `x & y` `(x % y) % y` -> `x % y`
Diffstat (limited to 'src/wasm/wasm-debug.cpp')
0 files changed, 0 insertions, 0 deletions