aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/MIR/basic-blocks.mir
blob: 17313047576b4c24d9ec7ee3df4e03ee69e2f459 (plain) (blame)
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
# RUN: llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
# This test ensures that the MIR parser parses machine functions correctly.

--- |

  define i32 @foo() {
  entry:
    ret i32 0
  }

  define i32 @bar() {
  start:
    ret i32 0
  }

...
---
# CHECK: name: foo
# CHECK: body:
# CHECK-NEXT: - id: 0
# CHECK-NEXT:   name: entry
# CHECK-NEXT:   alignment: 0
# CHECK-NEXT:   isLandingPad: false
# CHECK-NEXT:   addressTaken: false
name:            foo
body:
 - id:           0
   name:         entry
...
---
# CHECK: name: bar
# CHECK: body:
# CHECK-NEXT: - id: 0
# CHECK-NEXT:   name: start
# CHECK-NEXT:   alignment: 4
# CHECK-NEXT:   isLandingPad: false
# CHECK-NEXT:   addressTaken: false
# CHECK-NEXT: - id: 1
# CHECK-NEXT:   alignment: 0
# CHECK-NEXT:   isLandingPad: false
# CHECK-NEXT:   addressTaken: true
name:            bar
body:
 - id:           0
   name:         start
   alignment:    4
 - id:           1
   addressTaken: true
...