binaryen
binaryen copied to clipboard
Optimize binary operators with equal children even if side effect
Currently, wasm-opt cannot deduce the following code to zero because the children have side effects. However, performing the deduction while preserving the side effects is acceptable.
(i32.ne
(local.tee $0
(i32.add
(local.get $0)
(i32.const 4059)
)
)
(local.get $0)
)
Fixes: #7440