1 # RUN: llc -mtriple=aarch64--- -run-pass=machine-outliner \
2 # RUN: -verify-machineinstrs %s -o - | FileCheck %s
5 define void @no-save1() #0 { ret void }
6 define void @no-save2() #0 { ret void }
7 define void @reg-save() #0 { ret void }
8 define void @stack-save() #0 { ret void }
9 attributes #0 = { minsize noinline noredzone "frame-pointer"="all" }
14 tracksRegLiveness: true
20 ; CHECK-LABEL: name: no-save1
21 ; CHECK: BL [[FN:@OUTLINED_FUNCTION_[0-9]+]]
25 $x12 = ADDXri $sp, 48, 0;
26 $x12 = ADDXri $sp, 48, 0;
27 $x12 = ADDXri $sp, 48, 0;
28 $x12 = ADDXri $sp, 48, 0;
29 $x12 = ADDXri $sp, 48, 0;
37 tracksRegLiveness: true
43 ; CHECK-LABEL: name: no-save2
48 $x12 = ADDXri $sp, 48, 0;
49 $x12 = ADDXri $sp, 48, 0;
50 $x12 = ADDXri $sp, 48, 0;
51 $x12 = ADDXri $sp, 48, 0;
52 $x12 = ADDXri $sp, 48, 0;
59 tracksRegLiveness: true
66 ; CHECK-LABEL: name: reg-save
67 ; CHECK: $[[REG:x[0-9]+]] = ORRXrs $xzr, $lr, 0
68 ; CHECK-NEXT: BL [[FN]]
69 ; CHECK-NEXT: $lr = ORRXrs $xzr, $[[REG]], 0
70 $x12 = ADDXri $sp, 48, 0;
71 $x12 = ADDXri $sp, 48, 0;
72 $x12 = ADDXri $sp, 48, 0;
73 $x12 = ADDXri $sp, 48, 0;
74 $x12 = ADDXri $sp, 48, 0;
83 tracksRegLiveness: true
86 liveins: $lr, $x0, $x1, $x2, $x3, $x4, $x5, $x6, $x7, $x8, $x9, $x10, $x11, $x12, $x13, $x14, $x15, $x18, $x19, $x20, $x21, $x22, $x23, $x20, $x21, $x22, $x23, $x24, $x25, $x26, $x27, $x28, $fp
89 liveins: $lr, $x0, $x1, $x2, $x3, $x4, $x5, $x6, $x7, $x8, $x9, $x10, $x11, $x12, $x13, $x14, $x15, $x18, $x19, $x20, $x21, $x22, $x23, $x20, $x21, $x22, $x23, $x24, $x25, $x26, $x27, $x28, $fp
90 ; CHECK-LABEL: name: stack-save
92 $x12 = ADDXri $sp, 48, 0;
93 $x12 = ADDXri $sp, 48, 0;
94 $x12 = ADDXri $sp, 48, 0;
95 $x12 = ADDXri $sp, 48, 0;
96 $x12 = ADDXri $sp, 48, 0;
98 liveins: $lr, $x0, $x1, $x2, $x3, $x4, $x5, $x6, $x7, $x8, $x9, $x10, $x11, $x12, $x13, $x14, $x15, $x18, $x19, $x20, $x21, $x22, $x23, $x20, $x21, $x22, $x23, $x24, $x25, $x26, $x27, $x28, $fp