;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.

;; RUN: wasm-opt -all             %s -S -o - | filecheck %s

;; RUN: wasm-opt -all --roundtrip %s -S -o - | filecheck %s --check-prefix=RTRIP

(module
  ;; CHECK:      (type $0 (func))

  ;; CHECK:      (func $func (type $0)
  ;; CHECK-NEXT:  (call $func)
  ;; CHECK-NEXT:  (@binaryen.removable.if.unused)
  ;; CHECK-NEXT:  (call $func)
  ;; CHECK-NEXT:  (call $func)
  ;; CHECK-NEXT: )
  ;; RTRIP:      (type $0 (func))

  ;; RTRIP:      (func $func (type $0)
  ;; RTRIP-NEXT:  (call $func)
  ;; RTRIP-NEXT:  (@binaryen.removable.if.unused)
  ;; RTRIP-NEXT:  (call $func)
  ;; RTRIP-NEXT:  (call $func)
  ;; RTRIP-NEXT: )
  (func $func
    ;; Three calls, one annotated in the middle.
    (call $func)
    (@binaryen.removable.if.unused)
    (call $func)
    (call $func)
  )
)
