diff options
author | Alon Zakai <azakai@google.com> | 2022-08-18 09:14:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 09:14:25 -0700 |
commit | 68bf5e3790c8ca95f52c5c5758775a592e708d77 (patch) | |
tree | 11269c53340c60cf261e1ff2debf1929060ea9d8 /test/lit/passes/optimize-instructions-nontrapping-float-to-int.wast | |
parent | 0c9ffd618ba69128caa61583a7cd9a831fef1d98 (diff) | |
download | binaryen-68bf5e3790c8ca95f52c5c5758775a592e708d77.tar.gz binaryen-68bf5e3790c8ca95f52c5c5758775a592e708d77.tar.bz2 binaryen-68bf5e3790c8ca95f52c5c5758775a592e708d77.zip |
[Wasm GC] Fix TypeRefining on fallthrough values via tee (#4900)
A rather tricky corner case: we normally look at fallthrough values for copies of
fields, so when we try to refine a field, we ignore stuff like this:
a.x = b.x;
That copies the same field on the same type to itself, so refining is not limited by
it. But if we have something else in the middle, and that thing cannot change
type, then it is a problem, like this:
(struct.set
(..ref..)
(local.tee $temp
(struct.get)))
tee has the type of the local, which does not change in this pass. So we can't
look at just the fallthrough here and skip the tee: after refining the field, the
tee's old type might not fit in the field's new type.
We could perhaps add casts to fix things up, but those may have too big a
cost. For now, just ignore the fallthrough.
Diffstat (limited to 'test/lit/passes/optimize-instructions-nontrapping-float-to-int.wast')
0 files changed, 0 insertions, 0 deletions