diff options
Diffstat (limited to 'test/lit/passes/merge-blocks.wast')
-rw-r--r-- | test/lit/passes/merge-blocks.wast | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/lit/passes/merge-blocks.wast b/test/lit/passes/merge-blocks.wast index e6136d4da..3d931690b 100644 --- a/test/lit/passes/merge-blocks.wast +++ b/test/lit/passes/merge-blocks.wast @@ -188,4 +188,42 @@ ) ) ) + + ;; CHECK: (func $if-condition (result i32) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (i32.const 0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (if (result i32) + ;; CHECK-NEXT: (i32.const 1) + ;; CHECK-NEXT: (block (result i32) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (i32.const 2) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.const 3) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (block (result i32) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (i32.const 4) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.const 5) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $if-condition (result i32) + ;; Content can be moved out of an if condition, but not anywhere else. + (if (result i32) + (block (result i32) + (drop (i32.const 0)) + (i32.const 1) + ) + (block (result i32) + (drop (i32.const 2)) + (i32.const 3) + ) + (block (result i32) + (drop (i32.const 4)) + (i32.const 5) + ) + ) + ) ) |