| ;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. |
| |
| ;; RUN: wasm-opt %s --merge-locals -all -S -o - | filecheck %s |
| |
| (module |
| ;; CHECK: (func $between-unreachable (type $0) (result i32) |
| ;; CHECK-NEXT: (local $x i32) |
| ;; CHECK-NEXT: (local $y i32) |
| ;; CHECK-NEXT: (select |
| ;; CHECK-NEXT: (unreachable) |
| ;; CHECK-NEXT: (local.tee $x |
| ;; CHECK-NEXT: (local.get $y) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: (unreachable) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: ) |
| (func $between-unreachable (result i32) |
| (local $x i32) |
| (local $y i32) |
| (select |
| (unreachable) |
| ;; The local copy here is in between unreachables. We should not error. |
| (local.tee $x |
| (local.get $y) |
| ) |
| (unreachable) |
| ) |
| ) |
| ) |
| |