diff options
Diffstat (limited to 'src/passes/MergeBlocks.cpp')
-rw-r--r-- | src/passes/MergeBlocks.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp index b77dbef83..6ba486717 100644 --- a/src/passes/MergeBlocks.cpp +++ b/src/passes/MergeBlocks.cpp @@ -520,6 +520,11 @@ struct MergeBlocks } } + void visitIf(If* curr) { + // We can move code out of the condition, but not any of the other children. + optimize(curr, curr->condition); + } + void optimizeTernary(Expression* curr, Expression*& first, Expression*& second, |