diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/Vacuum.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index 63a098fc0..13b9c62fd 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -288,14 +288,12 @@ struct Vacuum : public WalkerPass<ExpressionStackWalker<Vacuum>> { auto* iff = curr->value->dynCast<If>(); if (iff && iff->ifFalse && isConcreteWasmType(iff->type)) { // reuse the drop in both cases - if (iff->ifTrue->type == unreachable) { - assert(isConcreteWasmType(iff->ifFalse->type)); + if (iff->ifTrue->type == unreachable && isConcreteWasmType(iff->ifFalse->type)) { curr->value = iff->ifFalse; iff->ifFalse = curr; iff->type = none; replaceCurrent(iff); - } else if (iff->ifFalse->type == unreachable) { - assert(isConcreteWasmType(iff->ifTrue->type)); + } else if (iff->ifFalse->type == unreachable && isConcreteWasmType(iff->ifTrue->type)) { curr->value = iff->ifTrue; iff->ifTrue = curr; iff->type = none; |