diff options
author | Alon Zakai <azakai@google.com> | 2022-12-16 11:20:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-16 11:20:20 -0800 |
commit | 960f3844f339394feba032f1875adb9e46739453 (patch) | |
tree | 12fd9488f172d36cdeacdc189e74d7ca7fff1c22 /src/tools/wasm-opt.cpp | |
parent | a9ebf0dd842dc5b239a233177cfc9ccbd675fba7 (diff) | |
download | binaryen-960f3844f339394feba032f1875adb9e46739453.tar.gz binaryen-960f3844f339394feba032f1875adb9e46739453.tar.bz2 binaryen-960f3844f339394feba032f1875adb9e46739453.zip |
[Wasm GC] Optimize away null arms that would trap (#5358)
E.g.
(struct.get
(select
(ref.null ..)
(something)
(condition)
)
)
If traps-never-happen then this can be
(drop (condition))
(struct.get
(something)
)
That is, we can remove the arm that is null, as it would trap but traps are
assumed to not happen.
Also fix a bug this uncovers on struct.set on a null type.
Diffstat (limited to 'src/tools/wasm-opt.cpp')
0 files changed, 0 insertions, 0 deletions