summaryrefslogtreecommitdiff
path: root/test/llvm_autogenerated/switch.wast
blob: 3a426edd7e5ff6e21b05b9151a281c65263f3f80 (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
(module
  (type $FUNCSIG$v (func))
  (import "env" "foo0" (func $foo0))
  (import "env" "foo1" (func $foo1))
  (import "env" "foo2" (func $foo2))
  (import "env" "foo3" (func $foo3))
  (import "env" "foo4" (func $foo4))
  (import "env" "foo5" (func $foo5))
  (table 0 anyfunc)
  (memory $0 1)
  (data (i32.const 4) "\10\04\00\00")
  (export "memory" (memory $0))
  (export "bar32" (func $bar32))
  (export "bar64" (func $bar64))
  (func $bar32 (param $0 i32)
    (block $label$0
      (br_if $label$0
        (i32.gt_u
          (get_local $0)
          (i32.const 23)
        )
      )
      (block $label$1
        (block $label$2
          (block $label$3
            (block $label$4
              (block $label$5
                (block $label$6
                  (br_table $label$6 $label$6 $label$6 $label$6 $label$6 $label$6 $label$6 $label$5 $label$5 $label$5 $label$5 $label$5 $label$5 $label$5 $label$5 $label$4 $label$4 $label$4 $label$4 $label$4 $label$4 $label$3 $label$2 $label$1 $label$6
                    (get_local $0)
                  )
                )
                (call $foo0)
                (return)
              )
              (call $foo1)
              (return)
            )
            (call $foo2)
            (return)
          )
          (call $foo3)
          (return)
        )
        (call $foo4)
        (return)
      )
      (call $foo5)
    )
    (return)
  )
  (func $bar64 (param $0 i64)
    (block $label$0
      (br_if $label$0
        (i64.gt_u
          (get_local $0)
          (i64.const 23)
        )
      )
      (block $label$1
        (block $label$2
          (block $label$3
            (block $label$4
              (block $label$5
                (block $label$6
                  (br_table $label$6 $label$6 $label$6 $label$6 $label$6 $label$6 $label$6 $label$5 $label$5 $label$5 $label$5 $label$5 $label$5 $label$5 $label$5 $label$4 $label$4 $label$4 $label$4 $label$4 $label$4 $label$3 $label$2 $label$1 $label$6
                    (i32.wrap/i64
                      (get_local $0)
                    )
                  )
                )
                (call $foo0)
                (return)
              )
              (call $foo1)
              (return)
            )
            (call $foo2)
            (return)
          )
          (call $foo3)
          (return)
        )
        (call $foo4)
        (return)
      )
      (call $foo5)
    )
    (return)
  )
)
;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] }