1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --include-generated-funcs
2 # RUN: llc %s -mtriple aarch64 -outliner-leaf-descendants=false -debug-only=machine-outliner -run-pass=machine-outliner -o - 2>&1 | FileCheck %s
3 # RUN: llc %s -mtriple aarch64 -debug-only=machine-outliner -run-pass=machine-outliner -o - 2>&1 | FileCheck %s --check-prefix=CHECK-LEAF
6 # CHECK: *** Discarding overlapping candidates ***
7 # CHECK-NEXT:Searching for overlaps in all repeated sequences...
8 # CHECK-DAG: Sequence length: 7
9 # CHECK-NEXT: Candidates discarded: 0
10 # CHECK-NEXT: Candidates kept: 2
11 # CHECK-DAG: Sequence length: 8
12 # CHECK-NEXT: .. DISCARD candidate @ [12, 19]; overlaps with candidate @ [5, 12]
13 # CHECK-NEXT: Candidates discarded: 1
14 # CHECK-NEXT: Candidates kept: 1
15 # CHECK-DAG: Sequence length: 9
16 # CHECK-NEXT: .. DISCARD candidate @ [11, 19]; overlaps with candidate @ [4, 12]
17 # CHECK-NEXT: Candidates discarded: 1
18 # CHECK-NEXT: Candidates kept: 1
19 # CHECK-DAG: Sequence length: 10
20 # CHECK-NEXT: .. DISCARD candidate @ [10, 19]; overlaps with candidate @ [3, 12]
21 # CHECK-NEXT: Candidates discarded: 1
22 # CHECK-NEXT: Candidates kept: 1
23 # CHECK-DAG: Sequence length: 11
24 # CHECK-NEXT: .. DISCARD candidate @ [9, 19]; overlaps with candidate @ [2, 12]
25 # CHECK-NEXT: Candidates discarded: 1
26 # CHECK-NEXT: Candidates kept: 1
27 # CHECK-DAG: Sequence length: 12
28 # CHECK-NEXT: .. DISCARD candidate @ [8, 19]; overlaps with candidate @ [1, 12]
29 # CHECK-NEXT: Candidates discarded: 1
30 # CHECK-NEXT: Candidates kept: 1
31 # CHECK-DAG: Sequence length: 13
32 # CHECK-NEXT: .. DISCARD candidate @ [7, 19]; overlaps with candidate @ [0, 12]
33 # CHECK-NEXT: Candidates discarded: 1
34 # CHECK-NEXT: Candidates kept: 1
39 tracksRegLiveness: true
45 ; CHECK-LABEL: name: overlap
46 ; CHECK: liveins: $x0, $x9
48 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
49 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
50 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
51 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
52 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
53 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
54 ; CHECK-NEXT: BL @OUTLINED_FUNCTION_0, implicit-def $lr, implicit $sp, implicit-def $lr, implicit-def $x8, implicit-def $x9, implicit $sp, implicit $x0, implicit $x9
55 ; CHECK-NEXT: BL @OUTLINED_FUNCTION_0, implicit-def $lr, implicit $sp, implicit-def $lr, implicit-def $x8, implicit-def $x9, implicit $sp, implicit $x0, implicit $x9
56 ; CHECK-NEXT: RET undef $x9
58 ; CHECK-LABEL: name: OUTLINED_FUNCTION_0
59 ; CHECK: liveins: $x0, $x9, $lr
61 ; CHECK-NEXT: $x8 = ADDXri $x0, 3, 0
62 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
63 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
64 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
65 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
66 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
67 ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
70 ; CHECK-LEAF-LABEL: name: overlap
71 ; CHECK-LEAF: liveins: $x0, $x9
72 ; CHECK-LEAF-NEXT: {{ $}}
73 ; CHECK-LEAF-NEXT: BL @OUTLINED_FUNCTION_0
74 ; CHECK-LEAF-NEXT: BL @OUTLINED_FUNCTION_0
75 ; CHECK-LEAF-NEXT: $x8 = ADDXri $x0, 3, 0
76 ; CHECK-LEAF-NEXT: BL @OUTLINED_FUNCTION_0
77 ; CHECK-LEAF-NEXT: BL @OUTLINED_FUNCTION_0
78 ; CHECK-LEAF-NEXT: $x8 = ADDXri $x0, 3, 0
79 ; CHECK-LEAF-NEXT: BL @OUTLINED_FUNCTION_0
80 ; CHECK-LEAF-NEXT: BL @OUTLINED_FUNCTION_0
81 ; CHECK-LEAF-NEXT: RET undef $x9
83 ; CHECK-LEAF-LABEL: name: OUTLINED_FUNCTION_0
84 ; CHECK-LEAF: liveins: $x0, $x9, $lr
85 ; CHECK-LEAF-NEXT: {{ $}}
86 ; CHECK-LEAF-NEXT: $x9 = ADDXri $x9, 16, 0
87 ; CHECK-LEAF-NEXT: $x9 = ADDXri $x9, 16, 0
88 ; CHECK-LEAF-NEXT: $x9 = ADDXri $x9, 16, 0
89 ; CHECK-LEAF-NEXT: RET $lr
91 $x9 = ADDXri $x9, 16, 0
92 $x9 = ADDXri $x9, 16, 0
93 $x9 = ADDXri $x9, 16, 0
94 $x9 = ADDXri $x9, 16, 0
95 $x9 = ADDXri $x9, 16, 0
96 $x9 = ADDXri $x9, 16, 0
98 $x8 = ADDXri $x0, 3, 0
100 $x9 = ADDXri $x9, 16, 0
101 $x9 = ADDXri $x9, 16, 0
102 $x9 = ADDXri $x9, 16, 0
103 $x9 = ADDXri $x9, 16, 0
104 $x9 = ADDXri $x9, 16, 0
105 $x9 = ADDXri $x9, 16, 0
107 $x8 = ADDXri $x0, 3, 0
109 $x9 = ADDXri $x9, 16, 0
110 $x9 = ADDXri $x9, 16, 0
111 $x9 = ADDXri $x9, 16, 0
112 $x9 = ADDXri $x9, 16, 0
113 $x9 = ADDXri $x9, 16, 0
114 $x9 = ADDXri $x9, 16, 0