blob: 6c2af951adb05face6f1c0112e7bc28ea1008793 [file] [edit]
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
;; RUN: wasm-opt %s -all --strip-toolchain-annotations -S -o - | filecheck %s
(module
;; CHECK: (func $test (type $0) (param $0 i32)
;; CHECK-NEXT: (@metadata.code.inline "\00")
;; CHECK-NEXT: (call $test
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: (call $test
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
;; CHECK-NEXT: (@metadata.code.inline "\00")
;; CHECK-NEXT: (call $test
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: (@metadata.code.inline "\00")
;; CHECK-NEXT: (call $test
;; CHECK-NEXT: (i32.const 3)
;; CHECK-NEXT: )
;; CHECK-NEXT: (call $test
;; CHECK-NEXT: (i32.const 4)
;; CHECK-NEXT: )
;; CHECK-NEXT: (call $test
;; CHECK-NEXT: (i32.const 5)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $test (param i32)
;; Inlining hints are not removed, as they are for the VM too.
(@metadata.code.inline "\00")
(call $test (i32.const 0))
;; Toolchain hints are removed.
(@binaryen.removable.if.unused)
(call $test (i32.const 1))
;; When both are present, remove the toolchain one, in either order.
(@binaryen.removable.if.unused)
(@metadata.code.inline "\00")
(call $test (i32.const 2))
(@metadata.code.inline "\00")
(@binaryen.removable.if.unused)
(call $test (i32.const 3))
;; This should be removed too.
(@binaryen.idempotent)
(call $test (i32.const 4))
;; And this.
(@binaryen.inline "\00")
(call $test (i32.const 5))
)
)