cranelift-wasm: Jump to the destination block at end of consequent
This commit fixes a bug where at the end of an `if..else..end`'s consequent block, we would sometimes erroneously jump to the `else` block instead of to the following destination block. Not good!
This commit is contained in:
committed by
Dan Gohman
parent
b3cf7f911b
commit
913d26841a
9
cranelift/wasmtests/multi-16.wat
Normal file
9
cranelift/wasmtests/multi-16.wat
Normal file
@@ -0,0 +1,9 @@
|
||||
(module
|
||||
(func (export "param") (param i32) (result i32)
|
||||
(i32.const 1)
|
||||
(if (param i32) (result i32) (local.get 0)
|
||||
(then (i32.const 2) (i32.add))
|
||||
(else (i32.const -2) (i32.add))
|
||||
)
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user