blob: fd8fca5d316d9e66f62bb23161fa9b0ba6114412 [file] [edit]
(module
(type $0 (func))
(type $1 (func (param i32)))
(type $2 (func (param i32 i32)))
(type $3 (func (param i32 f64)))
(func $basic (type $3) (param $x i32) (param $y f64)
(local $a f32)
(local $b i64)
(local.set $x
(i32.const 0)
)
(local.set $y
(f64.const 0)
)
(drop
(f32.const 0)
)
(drop
(i64.const 0)
)
)
(func $later-param-use (type $1) (param $x i32)
(local.set $x
(i32.const 0)
)
(drop
(i32.const 0)
)
)
(func $diff-value (type $1) (param $x i32)
(local $a i32)
(local.set $x
(i32.const 0)
)
(local.set $x
(i32.const 1)
)
(drop
(i32.const 1)
)
(local.set $a
(i32.const 1)
)
(drop
(i32.const 1)
)
(local.set $a
(i32.const 0)
)
)
(func $tuple-value (type $0)
(local $x (tuple i32 i64))
(local.set $x
(tuple.make 2
(i32.const 42)
(i64.const 42)
)
)
(tuple.drop 2
(tuple.make 2
(i32.const 42)
(i64.const 42)
)
)
)
(func $unreach (type $0)
(local $a i32)
(block $x
(drop
(i32.const 0)
)
(local.set $a
(i32.const 1)
)
(drop
(i32.const 1)
)
(br $x)
(local.set $a
(i32.const 1)
)
(local.set $a
(i32.const 2)
)
(local.set $a
(i32.const 2)
)
)
)
(func $loop (type $0)
(local $a i32)
(local $b i32)
(loop $x
(local.set $a
(i32.const 0)
)
(local.set $a
(i32.const 1)
)
(br_if $x
(i32.const 1)
)
)
(block $y
(drop
(i32.const 0)
)
(local.set $b
(i32.const 1)
)
(br $y)
)
(drop
(i32.const 1)
)
)
(func $if (type $0)
(local $x i32)
(if
(i32.const 0)
(then
(local.set $x
(i32.const 1)
)
)
(else
(local.set $x
(i32.const 1)
)
)
)
(drop
(i32.const 1)
)
)
(func $if2 (type $0)
(local $x i32)
(if
(local.tee $x
(i32.const 1)
)
(then
(drop
(i32.const 1)
)
)
(else
(drop
(i32.const 1)
)
)
)
(drop
(i32.const 1)
)
)
(func $if3 (type $0)
(local $x i32)
(if
(local.tee $x
(i32.const 1)
)
(then
(drop
(i32.const 1)
)
)
(else
(local.set $x
(i32.const 2)
)
)
)
(local.set $x
(i32.const 1)
)
)
(func $copy (type $0)
(local $x i32)
(local $y i32)
(local.set $x
(i32.const 1)
)
(local.set $y
(local.get $x)
)
(drop
(i32.const 1)
)
(local.set $x
(i32.const 2)
)
(if
(i32.const 1)
(then
(nop)
)
(else
(nop)
)
)
(local.set $y
(local.get $x)
)
(drop
(i32.const 2)
)
(if
(i32.const 1)
(then
(nop)
)
(else
(nop)
)
)
(drop
(i32.const 2)
)
(local.set $x
(i32.const 3)
)
(local.set $y
(i32.const 3)
)
(drop
(local.get $x)
)
)
(func $param-unique (type $1) (param $x i32)
(local $a i32)
(local.set $a
(local.get $x)
)
(drop
(local.get $x)
)
(local.set $x
(i32.eqz
(i32.const 9999)
)
)
(local.set $a
(local.get $x)
)
(drop
(local.get $x)
)
)
(func $set-unique (type $0)
(local $x i32)
(local $y i32)
(local.set $x
(i32.eqz
(i32.const 123)
)
)
(local.set $y
(local.get $x)
)
(drop
(local.get $x)
)
(local.set $x
(i32.eqz
(i32.const 456)
)
)
(local.set $y
(local.get $x)
)
(drop
(local.get $x)
)
(local.set $x
(i32.eqz
(i32.const 789)
)
)
(if
(i32.const 1)
(then
(nop)
)
(else
(nop)
)
)
(local.set $y
(local.get $x)
)
(drop
(local.get $x)
)
(local.set $x
(i32.eqz
(i32.const 1000)
)
)
(local.set $y
(local.get $x)
)
(if
(i32.const 1)
(then
(nop)
)
(else
(nop)
)
)
(drop
(local.get $x)
)
)
(func $identical_complex (type $1) (param $x i32)
(local $y i32)
(local.set $y
(local.get $x)
)
(drop
(local.get $x)
)
(drop
(local.get $x)
)
(drop
(local.get $x)
)
(drop
(local.get $y)
)
(drop
(local.get $y)
)
)
(func $merge (type $0)
(local $x i32)
(if
(i32.const 1)
(then
(local.set $x
(i32.const 1)
)
)
(else
(local.set $x
(i32.const 1)
)
)
)
(drop
(i32.const 1)
)
(local.set $x
(i32.const 2)
)
(loop $loop
(drop
(i32.const 2)
)
(local.set $x
(i32.const 3)
)
(local.set $x
(i32.const 2)
)
(br_if $loop
(i32.const 2)
)
)
(drop
(i32.const 2)
)
)
(func $one-arm (type $2) (param $1 i32) (param $3 i32)
(local.set $1
(local.get $3)
)
(if
(i32.const 1)
(then
(nop)
)
(else
(drop
(local.get $1)
)
)
)
)
(func $one-arm2 (type $2) (param $1 i32) (param $3 i32)
(local.set $1
(local.get $3)
)
(if
(i32.const 1)
(then
(drop
(local.get $1)
)
)
)
)
(func $many-merges (type $0)
(local $0 i32)
(local $1 i32)
(block $block
(br_if $block
(i32.const 0)
)
(loop $loop
(local.set $1
(local.get $0)
)
(local.set $0
(i32.const 99)
)
(br_if $loop
(i32.const 1)
)
)
)
(local.set $0
(local.get $1)
)
(if
(i32.const 0)
(then
(drop
(local.get $0)
)
)
)
)
(func $fuzz (type $0)
(local $x i32)
(loop $label$4
(block $label$5
(if
(i32.const 1)
(then
(local.set $x
(i32.const 203)
)
(br $label$5)
)
)
(br_if $label$4
(i32.const 2)
)
)
)
(loop $label$7
(if
(if (result i32)
(i32.const 3)
(then
(i32.const 4)
)
(else
(i32.const 5)
)
)
(then
(br $label$7)
)
)
)
)
(func $fuzz2 (type $0)
(local $var$1 i32)
(if
(i32.const 0)
(then
(if
(i32.const 1)
(then
(local.set $var$1
(i32.const 2)
)
)
)
)
)
(loop $label$10
(block $label$11
(if
(i32.const 5)
(then
(br_if $label$11
(i32.const 6)
)
)
)
(br $label$10)
)
)
)
(func $fuzz-nan (type $0)
(local $0 f64)
(local $1 f64)
(block $block
(br_if $block
(i32.const 0)
)
(loop $loop
(local.set $1
(local.get $0)
)
(local.set $0
(f64.const -nan:0xfffffffffff87)
)
(br_if $loop
(i32.const 1)
)
)
)
(local.set $0
(local.get $1)
)
(if
(i32.const 0)
(then
(drop
(local.get $0)
)
)
)
)
)