;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. ;; NOTE: This test was ported using port_passes_tests_to_lit.py and could be cleaned up. ;; RUN: foreach %s %t wasm-opt --untee -S -o - | filecheck %s (module ;; CHECK: (type $0 (func)) ;; CHECK: (func $tee ;; CHECK-NEXT: (local $x i32) ;; CHECK-NEXT: (local $y f64) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (block (result i32) ;; CHECK-NEXT: (local.set $x ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $x) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (block (result f64) ;; CHECK-NEXT: (local.set $y ;; CHECK-NEXT: (f64.const 2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $y) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $x ;; CHECK-NEXT: (block (result i32) ;; CHECK-NEXT: (local.set $x ;; CHECK-NEXT: (i32.const 3) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $x) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $x ;; CHECK-NEXT: (block (result i32) ;; CHECK-NEXT: (local.set $x ;; CHECK-NEXT: (block (result i32) ;; CHECK-NEXT: (local.set $x ;; CHECK-NEXT: (i32.const 3) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $x) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $x) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (unreachable) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $tee (local $x i32) (local $y f64) (drop (local.tee $x (i32.const 1))) (drop (local.tee $y (f64.const 2))) (local.set $x (local.tee $x (i32.const 3))) (local.set $x (local.tee $x (local.tee $x (i32.const 3)))) (drop (local.tee $x (unreachable))) ) )