| ;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. |
| ;; RUN: wasm-opt %s -all --roundtrip -S -o - | filecheck %s --check-prefix=RTRIP |
| (module |
| ;; RTRIP: (type $t (struct (field waitqueue))) |
| (type $t (struct (field waitqueue))) |
| |
| ;; RTRIP: (global $g (ref $t) (struct.new $t |
| ;; RTRIP-NEXT: (i32.const 0) |
| ;; RTRIP-NEXT: )) |
| (global $g (ref $t) (struct.new $t (i32.const 0))) |
| |
| ;; RTRIP: (func $waitqueue.wait (type $1) (result i32) |
| ;; RTRIP-NEXT: (waitqueue.wait |
| ;; RTRIP-NEXT: (global.get $g) |
| ;; RTRIP-NEXT: (i32.const 0) |
| ;; RTRIP-NEXT: (i64.const 0) |
| ;; RTRIP-NEXT: ) |
| ;; RTRIP-NEXT: ) |
| (func $waitqueue.wait (result i32) |
| (waitqueue.wait (global.get $g) (i32.const 0) (i64.const 0)) |
| ) |
| ;; RTRIP: (func $waitqueue.notify (type $1) (result i32) |
| ;; RTRIP-NEXT: (waitqueue.notify |
| ;; RTRIP-NEXT: (global.get $g) |
| ;; RTRIP-NEXT: (i32.const 0) |
| ;; RTRIP-NEXT: ) |
| ;; RTRIP-NEXT: ) |
| (func $waitqueue.notify (result i32) |
| (waitqueue.notify (global.get $g) (i32.const 0)) |
| ) |
| ) |