diff options
author | Alon Zakai <azakai@google.com> | 2023-04-05 15:40:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 15:40:13 -0700 |
commit | 1b25a3cb040b3e082d0471192084008634cf834d (patch) | |
tree | 844661f19b34dc2962754bf02a56b56b6fd475f7 /src | |
parent | c5603b6d315aa67f7c2b4b1d232813335c24aeb4 (diff) | |
download | binaryen-1b25a3cb040b3e082d0471192084008634cf834d.tar.gz binaryen-1b25a3cb040b3e082d0471192084008634cf834d.tar.bz2 binaryen-1b25a3cb040b3e082d0471192084008634cf834d.zip |
[Wasm GC] Handle another unreachability case in trapOnNull() (#5634)
This is the flip case of #5630
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/OptimizeInstructions.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/passes/OptimizeInstructions.cpp b/src/passes/OptimizeInstructions.cpp index f5a0c6756..3a5f56be9 100644 --- a/src/passes/OptimizeInstructions.cpp +++ b/src/passes/OptimizeInstructions.cpp @@ -1644,7 +1644,8 @@ struct OptimizeInstructions builder.makeDrop(select->condition))); return false; } - if (select->ifFalse->type.isNull()) { + if (select->ifFalse->type.isNull() && + select->ifTrue->type != Type::unreachable) { ref = getResultOfFirst( select->ifTrue, builder.makeSequence(builder.makeDrop(select->ifFalse), |