1# RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass none -o - %s | FileCheck %s
2# This test ensures that the MIR parser parses the cfi directives correctly.
3
4--- |
5
6  declare void @foo()
7
8  define void @trivial_fp_func() {
9  entry:
10    call void @foo()
11    ret void
12  }
13
14...
15---
16name:            trivial_fp_func
17# CHECK-LABEL: name: trivial_fp_func
18body: |
19  bb.0.entry:
20    ; CHECK: CFI_INSTRUCTION def_cfa $w29, 16
21    frame-setup CFI_INSTRUCTION def_cfa $w29, 16
22    ; CHECK: CFI_INSTRUCTION def_cfa_register $w29
23    frame-setup CFI_INSTRUCTION def_cfa_register $w29
24    ; CHECK: CFI_INSTRUCTION def_cfa_offset -8
25    frame-setup CFI_INSTRUCTION def_cfa_offset -8
26    ; CHECK: CFI_INSTRUCTION offset $w30, -8
27    frame-setup CFI_INSTRUCTION offset $w30, -8
28    ; CHECK: CFI_INSTRUCTION rel_offset $w30, -8
29    frame-setup CFI_INSTRUCTION rel_offset $w30, -8
30    ; CHECK: CFI_INSTRUCTION adjust_cfa_offset -8
31    frame-setup CFI_INSTRUCTION adjust_cfa_offset -8
32    CFI_INSTRUCTION restore $w30
33    ; CHECK: CFI_INSTRUCTION restore $w30
34    CFI_INSTRUCTION undefined $w30
35    ; CHECK: CFI_INSTRUCTION undefined $w30
36    CFI_INSTRUCTION same_value $w29
37    ; CHECK: CFI_INSTRUCTION same_value $w29
38    CFI_INSTRUCTION register $w20, $w30
39    ; CHECK: CFI_INSTRUCTION register $w20, $w30
40    CFI_INSTRUCTION remember_state
41    ; CHECK: CFI_INSTRUCTION remember_state
42    CFI_INSTRUCTION restore_state
43    ; CHECK: CFI_INSTRUCTION restore_state
44    CFI_INSTRUCTION escape 0x61, 0x62, 0x63
45    ; CHECK: CFI_INSTRUCTION escape 0x61, 0x62, 0x63
46    CFI_INSTRUCTION window_save
47    ; CHECK: CFI_INSTRUCTION window_save
48    RET_ReallyLR
49