From 96e9398420dd4612bc3f72ad8fedbcbc55e1577a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 24 Jul 2017 13:50:29 -0700 Subject: when finalizing a block in MergeBlocks, use its type, so that we don't need to consider type changes for its parent (changing it from a forced i32 to an unreachable might mean the parent needs to become unreachable too) --- src/passes/MergeBlocks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp index 455e54971..d32948bee 100644 --- a/src/passes/MergeBlocks.cpp +++ b/src/passes/MergeBlocks.cpp @@ -213,7 +213,7 @@ static void optimizeBlock(Block* curr, Module* module) { break; } } - if (changed) curr->finalize(); + if (changed) curr->finalize(curr->type); } void BreakValueDropper::visitBlock(Block* curr) { -- cgit v1.2.3