summaryrefslogtreecommitdiff
path: root/test/llvm_autogenerated/phi.wast
blob: 3bd742e8d81cfb99a9f8e41dac42d10ca346eb0c (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
67
(module
  (memory 1)
  (data (i32.const 4) "\10\04\00\00")
  (export "memory" memory)
  (export "test0" $test0)
  (export "test1" $test1)
  (func $test0 (param $0 i32) (result i32)
    (block $label$0
      (br_if $label$0
        (i32.gt_s
          (get_local $0)
          (i32.const -1)
        )
      )
      (set_local $0
        (i32.div_s
          (get_local $0)
          (i32.const 3)
        )
      )
    )
    (return
      (get_local $0)
    )
  )
  (func $test1 (param $0 i32) (result i32)
    (local $1 i32)
    (local $2 i32)
    (local $3 i32)
    (local $4 i32)
    (set_local $2
      (i32.const 0)
    )
    (set_local $3
      (i32.const 1)
    )
    (set_local $4
      (i32.const 0)
    )
    (loop $label$1 $label$0
      (set_local $1
        (get_local $2)
      )
      (set_local $2
        (get_local $3)
      )
      (set_local $3
        (get_local $1)
      )
      (br_if $label$0
        (i32.lt_s
          (set_local $4
            (i32.add
              (get_local $4)
              (i32.const 1)
            )
          )
          (get_local $0)
        )
      )
    )
    (return
      (get_local $1)
    )
  )
)
;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] }