summaryrefslogtreecommitdiff
path: root/test/lit/help/wasm-reduce.test
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-08-16 11:30:39 -0700
committerGitHub <noreply@github.com>2021-08-16 11:30:39 -0700
commitc68861fbdfeebe8ef8dada7673ad798811540780 (patch)
tree542608db5e70a1b728245e3c7f047b4e397b27c7 /test/lit/help/wasm-reduce.test
parent551b9dd9cd3c1194214a35e1b2a9d2f550577ff3 (diff)
downloadbinaryen-c68861fbdfeebe8ef8dada7673ad798811540780.tar.gz
binaryen-c68861fbdfeebe8ef8dada7673ad798811540780.tar.bz2
binaryen-c68861fbdfeebe8ef8dada7673ad798811540780.zip
[Wasm GC] Fix OptimizeInstructions on folding of identical code with nominal typing (#4069)
(if (result i32) (local.get $x) (struct.get $B 1 (ref.null $B) ) (struct.get $C 1 (ref.null $C) ) ) With structural typing it is safe to turn this into this: (struct.get $A 1 (if (result (ref $A)) (local.get $x) (ref.null $B) (ref.null $C) ) ) Here $A is the LUB of the others. This works since $A must have field 1 in it. But with nominal types it is possible that the LUB in fact does not have that field, and we would not validate. This actually seems like a more general issue that might happen with other things, even though atm perhaps it can't. For simplicity, avoid this pattern in both nominal and structural typing, to avoid making a difference between them.
Diffstat (limited to 'test/lit/help/wasm-reduce.test')
0 files changed, 0 insertions, 0 deletions