blob: 0acb210454ec88e50fdbf488f1bc27f8bc1074d3 [file] [log] [blame] [edit]
;; 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 -O3 --inlining -S -o - | filecheck %s
(module
(global $global$0 (mut f64) (f64.const -32768))
;; CHECK: (type $i32_=>_none (func (param i32)))
;; CHECK: (global $global$1 (mut i32) (i32.const 100))
(global $global$1 (mut i32) (i32.const 100))
;; CHECK: (memory $0 1 1)
(memory $0 1 1)
;; CHECK: (export "func_217" (func $1))
(export "func_217" (func $1))
(func $0
(if
(global.get $global$1)
(unreachable)
)
(global.set $global$1
(i32.const 0)
)
(block $label$2
(global.set $global$0
(block $label$3 (result f64)
(br_if $label$2
(if (result i32)
(i32.load16_u offset=3
(i32.const 0)
)
(i32.const 1)
(i32.const 0)
)
)
(unreachable)
)
)
)
)
;; CHECK: (func $1 (param $0 i32)
;; CHECK-NEXT: (if
;; CHECK-NEXT: (global.get $global$1)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: (global.set $global$1
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.eqz
;; CHECK-NEXT: (i32.load16_u
;; CHECK-NEXT: (i32.const 3)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $1 (param $var$0 i32)
(drop
(call $2
(f32.const 1)
(i32.const 1)
(i32.const 0)
)
)
)
(func $2 (param $var$0 f32) (param $var$1 i32) (param $var$2 i32) (result i32)
(call $0)
(i32.const 0)
)
)