summaryrefslogtreecommitdiff
path: root/src/passes/Directize.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-09-22 14:00:22 -0700
committerGitHub <noreply@github.com>2023-09-22 14:00:22 -0700
commit4f1295a96d175f39257a750e06a426e5beb3933a (patch)
tree67192d497029e3f87432bd094f967e48580675f9 /src/passes/Directize.cpp
parenta62ee0de8d0b1eccf8b5673b3ec9125cc44d3e3d (diff)
downloadbinaryen-4f1295a96d175f39257a750e06a426e5beb3933a.tar.gz
binaryen-4f1295a96d175f39257a750e06a426e5beb3933a.tar.bz2
binaryen-4f1295a96d175f39257a750e06a426e5beb3933a.zip
StackIR local2stack: Make sure we do not break non-nullable validation (#5919)
local2stack removes a pair of local.set 0 local.get 0 when that set is not used anywhere else: whatever value is put into the local, we can just leave it on the stack to replace the get. However, we only handled actual uses of the set which we checked using LocalGraph. There may be code that does not actually use the set local, but needs that set purely for validation reasons: local.set 0 local.get 0 block local.set 0 end local.get That last get reads the value set in the block, so the first set is not used by it. But for validation purposes, the inner set stops helping at the block end, so we do need that initial set. To fix this, check for gets that need our set to validate before removing any. Fixes #5917
Diffstat (limited to 'src/passes/Directize.cpp')
0 files changed, 0 insertions, 0 deletions