llvm-project/llvm/test/CodeGen/MIR/basic-blocks.mir

50 lines
989 B
YAML

# 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
...