| 1 |
(module |
| 2 |
(type (;0;) (func (result f32))) |
| 3 |
(type (;1;) (func (result i32))) |
| 4 |
(type (;2;) (func)) |
| 5 |
(func $fold-block (;0;) (type 0) (result f32) |
| 6 |
f32.const 0x1p+1 (;=2;) |
| 7 |
block ;; label = @1 |
| 8 |
f32.const 0x1.8p+1 (;=3;) |
| 9 |
br 0 (;@1;) |
| 10 |
end |
| 11 |
f32.const 0x1p+0 (;=1;) |
| 12 |
f32.add |
| 13 |
) |
| 14 |
(func $fold-block-br-value (;1;) (type 1) (result i32) |
| 15 |
block (result i32) ;; label = @1 |
| 16 |
i32.const 1 |
| 17 |
br 0 (;@1;) |
| 18 |
end |
| 19 |
) |
| 20 |
(func $fold-loop (;2;) (type 2) |
| 21 |
loop (result i64) ;; label = @1 |
| 22 |
br 0 (;@1;) |
| 23 |
i64.const 1 |
| 24 |
end |
| 25 |
drop |
| 26 |
) |
| 27 |
(func $fold-loop-br (;3;) (type 1) (result i32) |
| 28 |
loop (result i32) ;; label = @1 |
| 29 |
i32.const 1 |
| 30 |
br 0 (;@1;) |
| 31 |
end |
| 32 |
) |
| 33 |
(func $fold-if (;4;) (type 2) |
| 34 |
i32.const 1 |
| 35 |
if ;; label = @1 |
| 36 |
nop |
| 37 |
nop |
| 38 |
end |
| 39 |
) |
| 40 |
(func $fold-if-else (;5;) (type 2) |
| 41 |
i32.const 1 |
| 42 |
if (result i32) ;; label = @1 |
| 43 |
i32.const 2 |
| 44 |
else |
| 45 |
i32.const 3 |
| 46 |
end |
| 47 |
drop |
| 48 |
) |
| 49 |
(func $fold-if-else-br (;6;) (type 2) |
| 50 |
i32.const 1 |
| 51 |
if (result i32) ;; label = @1 |
| 52 |
i32.const 2 |
| 53 |
br 0 (;@1;) |
| 54 |
else |
| 55 |
i32.const 3 |
| 56 |
end |
| 57 |
drop |
| 58 |
) |
| 59 |
) |