blob: 5ba6a7ea5e34df6abf109dbff1b0162fbcb5750a (
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
|
(module
(memory 100 100)
(func $basics (export "localcse") (param $x i32) ($param $y i32) (result i32) ;; -O3 does localcse
(local $x2 i32)
(local $y2 i32)
(set_local $x2
(i32.add (get_local $x) (get_local $y))
)
(set_local $y2
(i32.add (get_local $x) (get_local $y))
)
(i32.add (get_local $x2) (get_local $y2))
)
(func $8 (export "localcse-2") (param $var$0 i32)
(param $var$1 i32)
(param $var$2 i32)
(param $var$3 i32)
(result i32)
(block $label$0 (result i32)
(i32.store
(tee_local $var$2
(i32.add
(get_local $var$1)
(i32.const 4)
)
)
(i32.and
(i32.load
(get_local $var$2)
)
(i32.xor
(tee_local $var$2
(i32.const 74)
)
(i32.const -1)
)
)
)
(i32.store
(tee_local $var$1
(i32.add
(get_local $var$1)
(i32.const 4)
)
)
(i32.or
(i32.load
(get_local $var$1)
)
(i32.and
(get_local $var$2)
(i32.const 8)
)
)
)
(i32.const 0)
)
)
)
|