1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-apple-unknown -run-pass=machine-outliner -verify-machineinstrs -outliner-leaf-descendants=false %s -o - | FileCheck %s
4 # Outlining CFI instructions is unsafe if we cannot outline all of the CFI
5 # instructions from a function. This shows that we choose not to outline the
6 # CFI instructions since function foo has a CFI Instruction that would not
10 define void @foo() #0 { ret void }
11 define void @bar() #0 { ret void }
12 define void @baz() #0 { ret void }
13 attributes #0 = { noredzone }
17 tracksRegLiveness: true
21 ; CHECK-LABEL: name: foo
23 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa $w28, 16
24 ; CHECK: $w9 = ORRWri $wzr, 1
25 ; CHECK: $w10 = ORRWri $wzr, 2
26 ; CHECK: $w11 = ORRWri $wzr, 3
27 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa $w29, 16
28 ; CHECK: TCRETURNdi @OUTLINED_FUNCTION_0, 0, implicit $sp, implicit-def $w12, implicit-def $w13, implicit-def $w14, implicit-def $w15, implicit $wzr, implicit $sp
29 frame-setup CFI_INSTRUCTION def_cfa $w28, 16
33 frame-setup CFI_INSTRUCTION def_cfa $w29, 16
42 tracksRegLiveness: true
46 ; CHECK-LABEL: name: bar
48 ; CHECK: $w9 = ORRWri $wzr, 1
49 ; CHECK: $w10 = ORRWri $wzr, 2
50 ; CHECK: $w11 = ORRWri $wzr, 3
51 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa $w29, 16
52 ; CHECK: TCRETURNdi @OUTLINED_FUNCTION_0, 0, implicit $sp, implicit-def $w12, implicit-def $w13, implicit-def $w14, implicit-def $w15, implicit $wzr, implicit $sp
56 frame-setup CFI_INSTRUCTION def_cfa $w29, 16
65 tracksRegLiveness: true
69 ; CHECK-LABEL: name: baz
71 ; CHECK: $w9 = ORRWri $wzr, 1
72 ; CHECK: $w10 = ORRWri $wzr, 2
73 ; CHECK: $w11 = ORRWri $wzr, 3
74 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa $w29, 16
75 ; CHECK: TCRETURNdi @OUTLINED_FUNCTION_0, 0, implicit $sp, implicit-def $w12, implicit-def $w13, implicit-def $w14, implicit-def $w15, implicit $wzr, implicit $sp
79 frame-setup CFI_INSTRUCTION def_cfa $w29, 16