blob: edb30289ba6543ac5ffc31d9a6f2bf67eff45996 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --fold-exprs
(module
(func $fold-get-local (result f32)
(local f32 f32 f64 f64)
get_local 0
get_local 1
f32.add
get_local 2
get_local 3
f64.add
f32.demote/f64
f32.add)
(func $fold-set-local
(local i64 i32)
i64.const 1
i64.const 2
i64.const 3
i64.xor
i64.xor
set_local 0
i32.const 4
set_local 1)
(func $fold-tee-local (result i32)
(local i32 i32)
i32.const 1
tee_local 0
i32.const 2
tee_local 1
i32.add)
)
(;; STDOUT ;;;
(module
(type (;0;) (func (result f32)))
(type (;1;) (func))
(type (;2;) (func (result i32)))
(func (;0;) (type 0) (result f32)
(local f32 f32 f64 f64)
(f32.add
(f32.add
(local.get 0)
(local.get 1))
(f32.demote_f64
(f64.add
(local.get 2)
(local.get 3)))))
(func (;1;) (type 1)
(local i64 i32)
(local.set 0
(i64.xor
(i64.const 1)
(i64.xor
(i64.const 2)
(i64.const 3))))
(local.set 1
(i32.const 4)))
(func (;2;) (type 2) (result i32)
(local i32 i32)
(i32.add
(local.tee 0
(i32.const 1))
(local.tee 1
(i32.const 2)))))
;;; STDOUT ;;)
|