summaryrefslogtreecommitdiff
path: root/test/wasm2js/unary-ops.2asm.js.opt
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-11-09 16:43:04 -0800
committerGitHub <noreply@github.com>2021-11-09 16:43:04 -0800
commitb260f1cc65096a7784da8ef8ad25a067e0480e5b (patch)
treee470790d9d230191660a7d96541da81e8ee3c77b /test/wasm2js/unary-ops.2asm.js.opt
parenta0325162a4b54f795d17550bff2b565c379dde51 (diff)
downloadbinaryen-b260f1cc65096a7784da8ef8ad25a067e0480e5b.tar.gz
binaryen-b260f1cc65096a7784da8ef8ad25a067e0480e5b.tar.bz2
binaryen-b260f1cc65096a7784da8ef8ad25a067e0480e5b.zip
OptimizeInstructions: Fix static cast optimizations (#4311)
We found one cast that has another as its input, and forgot that the child was possibly a fallthrough value. That is, there might be more code that needs to be kept around. Rather than fix the middle of the three cases there - the one with HeapType::isSubType(childIntendedType, intendedType) - I noticed it is not actually needed. That case checks if the child's type is more specific than the parent's, and if so, then the parent is not needed. But we already handle that earlier above in the same function: regardless of what the child of a static cast is, if the cast is static and the input is the proper type already, the cast is unneeded (see lines 1565-1566).
Diffstat (limited to 'test/wasm2js/unary-ops.2asm.js.opt')
0 files changed, 0 insertions, 0 deletions