Split the default edge of a br_table.

When splitting critical edges for a br_table to handle arguments being
passed, split the default edge along with the normal table edges.
This commit is contained in:
Dan Gohman
2018-10-26 06:20:08 -07:00
committed by Benjamin Bouvier
parent a5cad9a748
commit 3ff8867e57
2 changed files with 39 additions and 8 deletions

View File

@@ -0,0 +1,30 @@
(module
(func (result i32)
(block (result i32)
(block (result i32)
(block (result i32)
(br_table 0 1 2 3 (i32.const 42) (i32.const 0))
)
)
)
)
(func (result i32)
(block (result i32)
(block (result i32)
(block (result i32)
(br_table 3 2 1 0 (i32.const 42) (i32.const 0))
)
)
)
)
(func (result i32)
(block (result i32)
(br_table 0 0 1 1 (i32.const 42) (i32.const 0))
)
)
(func (result i32)
(block (result i32)
(br_table 1 1 0 0 (i32.const 42) (i32.const 0))
)
)
)