summaryrefslogtreecommitdiff
path: root/src/tools/wasm-opt.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-12-16 11:20:20 -0800
committerGitHub <noreply@github.com>2022-12-16 11:20:20 -0800
commit960f3844f339394feba032f1875adb9e46739453 (patch)
tree12fd9488f172d36cdeacdc189e74d7ca7fff1c22 /src/tools/wasm-opt.cpp
parenta9ebf0dd842dc5b239a233177cfc9ccbd675fba7 (diff)
downloadbinaryen-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