diff options
Diffstat (limited to 'src/passes/OptimizeInstructions.cpp')
-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), |