summaryrefslogtreecommitdiff
path: root/test/llvm_autogenerated/dead-vreg.wast
blob: b41745078539071d262c522a5192fab98c193911 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
(module
  (table 0 anyfunc)
  (memory $0 1)
  (data (i32.const 4) "\10\04\00\00")
  (export "memory" (memory $0))
  (export "foo" (func $foo))
  (func $foo (param $0 i32) (param $1 i32) (param $2 i32)
    (local $3 i32)
    (local $4 i32)
    (local $5 i32)
    (local $6 i32)
    (local $7 i32)
    (local $8 i32)
    (block $label$0
      (br_if $label$0
        (i32.lt_s
          (get_local $2)
          (i32.const 1)
        )
      )
      (set_local $3
        (i32.shl
          (get_local $1)
          (i32.const 2)
        )
      )
      (set_local $5
        (i32.const 0)
      )
      (set_local $4
        (i32.lt_s
          (get_local $1)
          (i32.const 1)
        )
      )
      (loop $label$1
        (block $label$2
          (br_if $label$2
            (get_local $4)
          )
          (set_local $6
            (i32.const 0)
          )
          (set_local $7
            (get_local $0)
          )
          (set_local $8
            (get_local $1)
          )
          (loop $label$3
            (i32.store
              (get_local $7)
              (get_local $6)
            )
            (set_local $6
              (i32.add
                (get_local $6)
                (get_local $5)
              )
            )
            (set_local $7
              (i32.add
                (get_local $7)
                (i32.const 4)
              )
            )
            (br_if $label$3
              (tee_local $8
                (i32.add
                  (get_local $8)
                  (i32.const -1)
                )
              )
            )
          )
        )
        (set_local $0
          (i32.add
            (get_local $0)
            (get_local $3)
          )
        )
        (br_if $label$1
          (i32.ne
            (tee_local $5
              (i32.add
                (get_local $5)
                (i32.const 1)
              )
            )
            (get_local $2)
          )
        )
      )
    )
  )
)
;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] }