MIR Tests: Add liveins and successors to make tests pass with machine verifier.
[oota-llvm.git] / test / CodeGen / MIR / invalid-jump-table-kind.mir
1 # RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
2
3 --- |
4
5   define i32 @test_jumptable(i32 %in) {
6   entry:
7     switch i32 %in, label %def [
8       i32 0, label %lbl1
9       i32 1, label %lbl2
10       i32 2, label %lbl3
11       i32 3, label %lbl4
12     ]
13
14   def:
15     ret i32 0
16
17   lbl1:
18     ret i32 1
19
20   lbl2:
21     ret i32 2
22
23   lbl3:
24     ret i32 4
25
26   lbl4:
27     ret i32 8
28   }
29
30 ...
31 ---
32 name:            test_jumptable
33 jumpTable:
34   # CHECK: [[@LINE+1]]:18: unknown enumerated scalar
35   kind:          switch
36   entries:
37     - id:        0
38       blocks:    [ '%bb.3.lbl1', '%bb.4.lbl2', '%bb.5.lbl3', '%bb.6.lbl4' ]
39 body:
40   - id:          0
41     name:        entry
42   - id:          1
43     name:        entry
44   - id:          2
45     name:        def
46   - id:          3
47     name:        lbl1
48   - id:          4
49     name:        lbl2
50   - id:          5
51     name:        lbl3
52   - id:          6
53     name:        lbl4
54 ...