| ;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. |
| |
| ;; RUN: wasm-opt -all %s -S -o -| filecheck %s |
| |
| (module |
| ;; CHECK: (type $shared-struct (shared (struct (field (mut (ref null (shared eq))))))) |
| (type $shared-struct (shared (struct (field (mut (ref null (shared eq))))))) |
| ;; CHECK: (func $cmpxchg-shared-expected (type $1) (param $shared-struct (ref $shared-struct)) |
| ;; CHECK-NEXT: (struct.atomic.rmw.cmpxchg $shared-struct 0 |
| ;; CHECK-NEXT: (local.get $shared-struct) |
| ;; CHECK-NEXT: (struct.new_default $shared-struct) |
| ;; CHECK-NEXT: (unreachable) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: ) |
| (func $cmpxchg-shared-expected (param $shared-struct (ref $shared-struct)) |
| (struct.atomic.rmw.cmpxchg $shared-struct 0 |
| (local.get $shared-struct) |
| ;; We should expect a shared eqref here, so we can parse this as written |
| ;; rather than dropping the operands and replacing them with unreachables. |
| (struct.new_default $shared-struct) |
| (unreachable) |
| ) |
| ) |
| ) |