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:
committed by
Benjamin Bouvier
parent
a5cad9a748
commit
3ff8867e57
30
cranelift/wasmtests/br_table.wat
Normal file
30
cranelift/wasmtests/br_table.wat
Normal 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))
|
||||
)
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user