@@ -7,8 +7,8 @@ target triple = "aarch64-unknown-linux-gnu"
7
7
declare void @normal_cc ()
8
8
9
9
; Caller: preserve_allcc; callee: normalcc. Normally callee saved registers
10
- ; x9~x15 need to be spilled. Since most of them will be spilled in pairs in
11
- ; reverse order, we only check the odd number ones due to FileCheck not
10
+ ; x10~x14 need to be spilled. Since most of them will be spilled in pairs in
11
+ ; reverse order, we only check the even number ones due to FileCheck not
12
12
; matching the same line of assembly twice.
13
13
; CHECK-LABEL: preserve_all
14
14
; CHECK-DAG: {{st[rp]}} {{(q[0-9]+, )?q8(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
@@ -22,21 +22,23 @@ declare void @normal_cc()
22
22
; CHECK-DAG: {{st[rp]}} {{(q[0-9]+, )?q26(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
23
23
; CHECK-DAG: {{st[rp]}} {{(q[0-9]+, )?q28(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
24
24
; CHECK-DAG: {{st[rp]}} {{(q[0-9]+, )?q30(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
25
- ; CHECK-DAG: {{st[rp]}} {{(x[0-9]+, )?x9(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
26
- ; CHECK-DAG: {{st[rp]}} {{(x[0-9]+, )?x11(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
27
- ; CHECK-DAG: {{st[rp]}} {{(x[0-9]+, )?x13(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
28
- ; CHECK-DAG: {{st[rp]}} {{(x[0-9]+, )?x15(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
25
+ ; CHECK-DAG: {{st[rp]}} {{(x[0-9]+, )?x10(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
26
+ ; CHECK-DAG: {{st[rp]}} {{(x[0-9]+, )?x12(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
27
+ ; CHECK-DAG: {{st[rp]}} {{(x[0-9]+, )?x14(, x[0-9]+)?}}, [sp, #{{[-0-9]+}}]
29
28
define preserve_allcc void @preserve_all () {
30
29
call void @normal_cc ()
31
30
ret void
32
31
}
33
32
34
33
; Caller: normalcc; callee: preserve_allcc. x9/q9 does not need to be spilled.
35
- ; The same holds for other x and q registers, but we only check x9 and q9.
34
+ ; The same holds for other x and q registers, but we only check x9, x11, and q9.
36
35
; CHECK-LABEL: normal_cc_caller
37
36
; CHECK-NOT: stp {{x[0-9]+}}, x9, [sp, #{{[-0-9]+}}]
38
37
; CHECK-NOT: stp x9, {{x[0-9]+}}, [sp, #{{[-0-9]+}}]
39
38
; CHECK-NOT: str x9, [sp, {{#[-0-9]+}}]
39
+ ; CHECK-NOT: stp {{x[0-9]+}}, x11, [sp, #{{[-0-9]+}}]
40
+ ; CHECK-NOT: stp x10, {{x[0-9]+}}, [sp, #{{[-0-9]+}}]
41
+ ; CHECK-NOT: str x10, [sp, {{#[-0-9]+}}]
40
42
; CHECK-NOT: stp {{q[0-9]+}}, q9, [sp, #{{[-0-9]+}}]
41
43
; CHECK-NOT: stp q9, {{q[0-9]+}}, [sp, #{{[-0-9]+}}]
42
44
; CHECK-NOT: str q9, [sp, {{#[-0-9]+}}]
0 commit comments