blob: 189adadcec17d927101820ad4fb904dc980dd168 [file] [log] [blame] [edit]
(module
(type $1 (func))
(type $2 (func (result i32)))
(type $3 (func (result f64)))
(type $0 (func (param i32)))
(type $5 (func (result v128)))
(type $6 (func (result i32 i64)))
(type $7 (func (result externref)))
(global $global i32 (i32.const 1))
(global $global-mut (mut i32) (i32.const 2))
(memory $m 512 512)
(data $0 (i32.const 0) "hello!")
(elem declare func $dummy)
(func $x (type $0) (param $x i32)
(call $x
(i32.const 2300)
)
(nop)
(drop
(i32.add
(i32.const 1)
(local.get $x)
)
)
(nop)
(nop)
(nop)
(nop)
(loop $in
(br $in)
)
(nop)
(block $c
(nop)
(call $x
(i32.const 4)
)
(br $c)
(br $c)
)
(drop
(block $val (result i32)
(nop)
(call $x
(i32.const 4)
)
(br $val
(i32.const 101)
)
(br $val
(i32.const 102)
)
)
)
(nop)
(drop
(block $d0 (result i32)
(call $x
(i32.const 5)
)
(nop)
(i32.const 1)
)
)
(drop
(block $d1 (result i32)
(call $x
(i32.const 6)
)
(nop)
(i32.const 1)
)
)
(drop
(block $d2 (result i32)
(call $x
(i32.const 7)
)
(nop)
(i32.const 2)
)
)
(call $x
(i32.const 2)
)
(call $x
(i32.const 1)
)
(call $x
(i32.const 0)
)
(call $x
(i32.const 0)
)
)
(func $ret (type $2) (result i32)
(if
(call $ret)
(then
(return
(i32.const 0)
)
)
)
(if
(call $ret)
(then
(return
(i32.const 1)
)
)
)
(i32.const 1)
)
(func $noret (type $1)
(if
(call $ret)
(then
(return)
)
)
)
(func $refinalize-br-condition-unreachable (type $1)
(block $label$1
(drop
(br_if $label$1
(unreachable)
)
)
)
)
(func $br_if-condition-is-block-i32-but-unreachable-so-refinalize-tricky (type $1)
(drop
(block $label$1 (result i32)
(drop
(br_if $label$1
(i32.const 100)
(block $label$3
(unreachable)
)
)
)
(i32.const 0)
)
)
)
(func $reuse-br-value (type $3) (result f64)
(block $label$0 (result f64)
(i32.store8
(i32.const 1919623207)
(if (result i32)
(i32.const 1)
(then
(block $label$2
(drop
(i64.and
(i64.trunc_f32_u
(f32.const 70847791997969805621592064)
)
(i64.const 729618461987467893)
)
)
(br $label$0
(f64.const 6.134856208230095e-154)
)
)
)
(else
(i32.load offset=3 align=2
(i32.const 169901344)
)
)
)
)
(f64.const 4776014875438170098655851e156)
)
)
(func $refinalize-two-breaks-one-unreachable (type $1)
(drop
(block $label$0 (result i64)
(block
(select
(i64.const 1)
(block
(global.set $global-mut
(i32.const 1)
)
(br $label$0
(i64.const -22)
)
)
(i32.const 0)
)
(drop
(i32.const 1)
)
)
)
)
)
(func $one-break-value-and-it-is-unreachable (type $3) (result f64)
(local $var$0 i32)
(block $label$6
(block
(unreachable)
(drop
(i32.const 0)
)
)
)
)
(func $global-notprecomputable (type $2) (result i32)
(i32.add
(i32.const 1)
(global.get $global-mut)
)
)
(func $global-precomputable (type $2) (result i32)
(i32.const 2)
)
(func $global-partiallyprecomputable (type $2) (result i32)
(i32.sub
(i32.add
(i32.const 1)
(global.get $global-mut)
)
(i32.const 2)
)
)
(func $simd-precompute (type $5) (result v128)
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
)
(func $no-memory-init-precompute (type $1)
(memory.init $0
(i32.const 512)
(i32.const 0)
(i32.const 12)
)
)
(func $no-data-drop-precompute (type $1)
(data.drop $0)
)
(func $no-memory-copy-precompute (type $1)
(memory.copy
(i32.const 512)
(i32.const 0)
(i32.const 12)
)
)
(func $no-memory-fill-precompute (type $1)
(memory.fill
(i32.const 512)
(i32.const 0)
(i32.const 12)
)
)
(func $tuple-precompute (type $6) (result i32 i64)
(tuple.make 2
(i32.const 42)
(i64.const 42)
)
)
(func $loop-precompute (type $2) (result i32)
(i32.const 1)
)
(func $reftype-test (type $7) (result externref)
(ref.null noextern)
)
(func $dummy (type $1)
(nop)
)
(func $br_reuse_node (type $1)
(drop
(block $l0 (result f32)
(drop
(block $l1
(global.set $global-mut
(i32.const 1)
)
(br $l0
(f32.const 3.5)
)
)
)
(f32.const 0)
)
)
(drop
(block $l2 (result nullexternref)
(drop
(block $l3
(global.set $global-mut
(i32.const 1)
)
(br $l2
(ref.null noextern)
)
)
)
(ref.null noextern)
)
)
(drop
(block $l4 (result (ref null $1))
(drop
(block $l5
(global.set $global-mut
(i32.const 1)
)
(br $l4
(ref.func $dummy)
)
)
)
(ref.null nofunc)
)
)
)
)