diff options
Diffstat (limited to 'src/passes/Vacuum.cpp')
-rw-r--r-- | src/passes/Vacuum.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index 40f4a6e59..0178a794d 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -232,6 +232,12 @@ struct Vacuum : public WalkerPass<PostWalker<Vacuum>> { replaceCurrent(child); return; } + // if the condition is unreachable, just return it + if (curr->condition->type == unreachable) { + replaceCurrent(curr->condition); + return; + } + // from here on, we can assume the condition executed if (curr->ifFalse) { if (curr->ifFalse->is<Nop>()) { curr->ifFalse = nullptr; |