blob: 96c20e3568648e68c6aa61134ceb8f6b92a4c09b [file] [log] [blame] [edit]
(module
(type $none_=>_none (func))
(type $i32_=>_none (func (param i32)))
(type $i32_i32_=>_none (func (param i32 i32)))
(type $i32_f64_=>_none (func (param i32 f64)))
(func $basic (type $i32_f64_=>_none) (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 $i32_=>_none) (param $x i32)
(local.set $x
(i32.const 0)
)
(drop
(i32.const 0)
)
)
(func $diff-value (type $i32_=>_none) (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 $none_=>_none)
(local $x (i32 i64))
(local.set $x
(tuple.make
(i32.const 42)
(i64.const 42)
)
)
(drop
(tuple.make
(i32.const 42)
(i64.const 42)
)
)
)
(func $unreach (type $none_=>_none)
(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 $none_=>_none)
(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 $none_=>_none)
(local $x i32)
(if
(i32.const 0)
(local.set $x
(i32.const 1)
)
(local.set $x
(i32.const 1)
)
)
(drop
(i32.const 1)
)
)
(func $if2 (type $none_=>_none)
(local $x i32)
(if
(local.tee $x
(i32.const 1)
)
(drop
(i32.const 1)
)
(drop
(i32.const 1)
)
)
(drop
(i32.const 1)
)
)
(func $if3 (type $none_=>_none)
(local $x i32)
(if
(local.tee $x
(i32.const 1)
)
(drop
(i32.const 1)
)
(local.set $x
(i32.const 2)
)
)
(local.set $x
(i32.const 1)
)
)
(func $copy (type $none_=>_none)
(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)
(nop)
(nop)
)
(local.set $y
(local.get $x)
)
(drop
(i32.const 2)
)
(if
(i32.const 1)
(nop)
(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 $i32_=>_none) (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 $none_=>_none)
(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)
(nop)
(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)
(nop)
(nop)
)
(drop
(local.get $x)
)
)
(func $identical_complex (type $i32_=>_none) (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 $none_=>_none)
(local $x i32)
(if
(i32.const 1)
(local.set $x
(i32.const 1)
)
(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 $i32_i32_=>_none) (param $1 i32) (param $3 i32)
(local.set $1
(local.get $3)
)
(if
(i32.const 1)
(nop)
(drop
(local.get $1)
)
)
)
(func $one-arm2 (type $i32_i32_=>_none) (param $1 i32) (param $3 i32)
(local.set $1
(local.get $3)
)
(if
(i32.const 1)
(drop
(local.get $1)
)
)
)
(func $many-merges (type $none_=>_none)
(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)
(drop
(local.get $0)
)
)
)
(func $fuzz (type $none_=>_none)
(local $x i32)
(loop $label$4
(block $label$5
(if
(i32.const 1)
(block
(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)
(i32.const 4)
(i32.const 5)
)
(br $label$7)
)
)
)
(func $fuzz2 (type $none_=>_none)
(local $var$1 i32)
(if
(i32.const 0)
(if
(i32.const 1)
(local.set $var$1
(i32.const 2)
)
)
)
(loop $label$10
(block $label$11
(if
(i32.const 5)
(br_if $label$11
(i32.const 6)
)
)
(br $label$10)
)
)
)
(func $fuzz-nan (type $none_=>_none)
(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)
(drop
(local.get $0)
)
)
)
)