summaryrefslogtreecommitdiff
path: root/scripts/auto_update_tests.py
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2022-08-29 18:22:01 +0300
committerGitHub <noreply@github.com>2022-08-29 08:22:01 -0700
commit7fb44812fa307a5924e5ada58b4015de6736cce3 (patch)
treefc8838b140979b25321bb62a8334a57e1cb96a99 /scripts/auto_update_tests.py
parentfea999ea89f89947cb72a1846ed1743dbe935d09 (diff)
downloadbinaryen-7fb44812fa307a5924e5ada58b4015de6736cce3.tar.gz
binaryen-7fb44812fa307a5924e5ada58b4015de6736cce3.tar.bz2
binaryen-7fb44812fa307a5924e5ada58b4015de6736cce3.zip
[OptimizeInstruction] Reorder rules in optimizeSelect (#4984)
To unblock some optimizations. For example this: ```wat (select (i32.eqz (local.get $x)) (i32.const 0) (i32.eqz (local.get $y)) ) ``` Was previously optimized as: ```wat (i32.eqz (select (i32.const 1) (local.get $x) (local.get $y) ) ) ``` Because `optimizeSelect` applied `!x ? !y : 0 -> x ? 0 : !y` then `!(x ? 1 : y)`, blocking the next rules which could have folded this to `or` or `and`. After this PR the same example optimizes better: ```wat (i32.eqz (i32.or (local.get $x) (local.get $y) ) ) ```
Diffstat (limited to 'scripts/auto_update_tests.py')
0 files changed, 0 insertions, 0 deletions