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) --- test/passes/merge-blocks.txt | 13 +++++++++++++ test/passes/merge-blocks.wast | 13 +++++++++++++ 2 files changed, 26 insertions(+) (limited to 'test') diff --git a/test/passes/merge-blocks.txt b/test/passes/merge-blocks.txt index dd496df2f..545438b1d 100644 --- a/test/passes/merge-blocks.txt +++ b/test/passes/merge-blocks.txt @@ -87,4 +87,17 @@ ) ) ) + (func $drop-block-squared-iloop (type $0) + (drop + (block $label$0 (result i32) + (block $label$1 + (drop + (loop $label$2 + (br $label$2) + ) + ) + ) + ) + ) + ) ) diff --git a/test/passes/merge-blocks.wast b/test/passes/merge-blocks.wast index 4b2f248e2..e998060c4 100644 --- a/test/passes/merge-blocks.wast +++ b/test/passes/merge-blocks.wast @@ -69,5 +69,18 @@ ) ) ) + (func $drop-block-squared-iloop + (drop + (block $label$0 (result i32) ;; this block's type should not change, so the drop remains none and valid + (drop + (block $label$1 + (loop $label$2 + (br $label$2) + ) + ) + ) + ) + ) + ) ) -- cgit v1.2.3