1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
3 ; RUN: -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names < %s | FileCheck --check-prefix=CHECK-PWR9 %s
5 define i64 @test(i64 %p1, i64 %p2, i64 %p3, i64 %p4) {
6 ; CHECK-PWR9-LABEL: test:
7 ; CHECK-PWR9: # %bb.0: # %entry
8 ; CHECK-PWR9-NEXT: stdu r1, -528(r1)
9 ; CHECK-PWR9-NEXT: .cfi_def_cfa_offset 528
10 ; CHECK-PWR9-NEXT: .cfi_offset r14, -288
11 ; CHECK-PWR9-NEXT: .cfi_offset r15, -280
12 ; CHECK-PWR9-NEXT: .cfi_offset r16, -272
13 ; CHECK-PWR9-NEXT: .cfi_offset r17, -264
14 ; CHECK-PWR9-NEXT: .cfi_offset r18, -256
15 ; CHECK-PWR9-NEXT: .cfi_offset r19, -248
16 ; CHECK-PWR9-NEXT: .cfi_offset r20, -240
17 ; CHECK-PWR9-NEXT: .cfi_offset r21, -232
18 ; CHECK-PWR9-NEXT: .cfi_offset r22, -224
19 ; CHECK-PWR9-NEXT: .cfi_offset r23, -216
20 ; CHECK-PWR9-NEXT: .cfi_offset r24, -208
21 ; CHECK-PWR9-NEXT: .cfi_offset r25, -200
22 ; CHECK-PWR9-NEXT: .cfi_offset r26, -192
23 ; CHECK-PWR9-NEXT: .cfi_offset r27, -184
24 ; CHECK-PWR9-NEXT: .cfi_offset r28, -176
25 ; CHECK-PWR9-NEXT: .cfi_offset r29, -168
26 ; CHECK-PWR9-NEXT: .cfi_offset r30, -160
27 ; CHECK-PWR9-NEXT: .cfi_offset r31, -152
28 ; CHECK-PWR9-NEXT: .cfi_offset f14, -144
29 ; CHECK-PWR9-NEXT: .cfi_offset f15, -136
30 ; CHECK-PWR9-NEXT: .cfi_offset f16, -128
31 ; CHECK-PWR9-NEXT: .cfi_offset f17, -120
32 ; CHECK-PWR9-NEXT: .cfi_offset f18, -112
33 ; CHECK-PWR9-NEXT: .cfi_offset f19, -104
34 ; CHECK-PWR9-NEXT: .cfi_offset f20, -96
35 ; CHECK-PWR9-NEXT: .cfi_offset f21, -88
36 ; CHECK-PWR9-NEXT: .cfi_offset f22, -80
37 ; CHECK-PWR9-NEXT: .cfi_offset f23, -72
38 ; CHECK-PWR9-NEXT: .cfi_offset f24, -64
39 ; CHECK-PWR9-NEXT: .cfi_offset f25, -56
40 ; CHECK-PWR9-NEXT: .cfi_offset f26, -48
41 ; CHECK-PWR9-NEXT: .cfi_offset f27, -40
42 ; CHECK-PWR9-NEXT: .cfi_offset f28, -32
43 ; CHECK-PWR9-NEXT: .cfi_offset f29, -24
44 ; CHECK-PWR9-NEXT: .cfi_offset f30, -16
45 ; CHECK-PWR9-NEXT: .cfi_offset f31, -8
46 ; CHECK-PWR9-NEXT: .cfi_offset v20, -480
47 ; CHECK-PWR9-NEXT: .cfi_offset v21, -464
48 ; CHECK-PWR9-NEXT: .cfi_offset v22, -448
49 ; CHECK-PWR9-NEXT: .cfi_offset v23, -432
50 ; CHECK-PWR9-NEXT: .cfi_offset v24, -416
51 ; CHECK-PWR9-NEXT: .cfi_offset v25, -400
52 ; CHECK-PWR9-NEXT: .cfi_offset v26, -384
53 ; CHECK-PWR9-NEXT: .cfi_offset v27, -368
54 ; CHECK-PWR9-NEXT: .cfi_offset v28, -352
55 ; CHECK-PWR9-NEXT: .cfi_offset v29, -336
56 ; CHECK-PWR9-NEXT: .cfi_offset v30, -320
57 ; CHECK-PWR9-NEXT: .cfi_offset v31, -304
58 ; CHECK-PWR9-NEXT: std r14, 240(r1) # 8-byte Folded Spill
59 ; CHECK-PWR9-NEXT: std r15, 248(r1) # 8-byte Folded Spill
60 ; CHECK-PWR9-NEXT: stxv v20, 48(r1) # 16-byte Folded Spill
61 ; CHECK-PWR9-NEXT: stxv v21, 64(r1) # 16-byte Folded Spill
62 ; CHECK-PWR9-NEXT: std r16, 256(r1) # 8-byte Folded Spill
63 ; CHECK-PWR9-NEXT: stxv v22, 80(r1) # 16-byte Folded Spill
64 ; CHECK-PWR9-NEXT: std r17, 264(r1) # 8-byte Folded Spill
65 ; CHECK-PWR9-NEXT: stxv v23, 96(r1) # 16-byte Folded Spill
66 ; CHECK-PWR9-NEXT: std r18, 272(r1) # 8-byte Folded Spill
67 ; CHECK-PWR9-NEXT: std r19, 280(r1) # 8-byte Folded Spill
68 ; CHECK-PWR9-NEXT: stxv v24, 112(r1) # 16-byte Folded Spill
69 ; CHECK-PWR9-NEXT: std r20, 288(r1) # 8-byte Folded Spill
70 ; CHECK-PWR9-NEXT: stxv v25, 128(r1) # 16-byte Folded Spill
71 ; CHECK-PWR9-NEXT: std r21, 296(r1) # 8-byte Folded Spill
72 ; CHECK-PWR9-NEXT: stxv v26, 144(r1) # 16-byte Folded Spill
73 ; CHECK-PWR9-NEXT: std r22, 304(r1) # 8-byte Folded Spill
74 ; CHECK-PWR9-NEXT: std r23, 312(r1) # 8-byte Folded Spill
75 ; CHECK-PWR9-NEXT: stxv v27, 160(r1) # 16-byte Folded Spill
76 ; CHECK-PWR9-NEXT: std r24, 320(r1) # 8-byte Folded Spill
77 ; CHECK-PWR9-NEXT: stxv v28, 176(r1) # 16-byte Folded Spill
78 ; CHECK-PWR9-NEXT: std r25, 328(r1) # 8-byte Folded Spill
79 ; CHECK-PWR9-NEXT: stxv v29, 192(r1) # 16-byte Folded Spill
80 ; CHECK-PWR9-NEXT: std r26, 336(r1) # 8-byte Folded Spill
81 ; CHECK-PWR9-NEXT: std r27, 344(r1) # 8-byte Folded Spill
82 ; CHECK-PWR9-NEXT: stxv v30, 208(r1) # 16-byte Folded Spill
83 ; CHECK-PWR9-NEXT: std r28, 352(r1) # 8-byte Folded Spill
84 ; CHECK-PWR9-NEXT: stxv v31, 224(r1) # 16-byte Folded Spill
85 ; CHECK-PWR9-NEXT: std r29, 360(r1) # 8-byte Folded Spill
86 ; CHECK-PWR9-NEXT: std r30, 368(r1) # 8-byte Folded Spill
87 ; CHECK-PWR9-NEXT: std r31, 376(r1) # 8-byte Folded Spill
88 ; CHECK-PWR9-NEXT: stfd f14, 384(r1) # 8-byte Folded Spill
89 ; CHECK-PWR9-NEXT: stfd f15, 392(r1) # 8-byte Folded Spill
90 ; CHECK-PWR9-NEXT: stfd f16, 400(r1) # 8-byte Folded Spill
91 ; CHECK-PWR9-NEXT: stfd f17, 408(r1) # 8-byte Folded Spill
92 ; CHECK-PWR9-NEXT: stfd f18, 416(r1) # 8-byte Folded Spill
93 ; CHECK-PWR9-NEXT: stfd f19, 424(r1) # 8-byte Folded Spill
94 ; CHECK-PWR9-NEXT: stfd f20, 432(r1) # 8-byte Folded Spill
95 ; CHECK-PWR9-NEXT: stfd f21, 440(r1) # 8-byte Folded Spill
96 ; CHECK-PWR9-NEXT: stfd f22, 448(r1) # 8-byte Folded Spill
97 ; CHECK-PWR9-NEXT: stfd f23, 456(r1) # 8-byte Folded Spill
98 ; CHECK-PWR9-NEXT: stfd f24, 464(r1) # 8-byte Folded Spill
99 ; CHECK-PWR9-NEXT: stfd f25, 472(r1) # 8-byte Folded Spill
100 ; CHECK-PWR9-NEXT: stfd f26, 480(r1) # 8-byte Folded Spill
101 ; CHECK-PWR9-NEXT: stfd f27, 488(r1) # 8-byte Folded Spill
102 ; CHECK-PWR9-NEXT: stfd f28, 496(r1) # 8-byte Folded Spill
103 ; CHECK-PWR9-NEXT: stfd f29, 504(r1) # 8-byte Folded Spill
104 ; CHECK-PWR9-NEXT: stfd f30, 512(r1) # 8-byte Folded Spill
105 ; CHECK-PWR9-NEXT: stfd f31, 520(r1) # 8-byte Folded Spill
106 ; CHECK-PWR9-NEXT: std r4, 40(r1) # 8-byte Folded Spill
107 ; CHECK-PWR9-NEXT: std r3, 32(r1) # 8-byte Folded Spill
108 ; CHECK-PWR9-NEXT: #APP
109 ; CHECK-PWR9-NEXT: nop
110 ; CHECK-PWR9-NEXT: #NO_APP
111 ; CHECK-PWR9-NEXT: ld r3, 40(r1) # 8-byte Folded Reload
112 ; CHECK-PWR9-NEXT: ld r4, 32(r1) # 8-byte Folded Reload
113 ; CHECK-PWR9-NEXT: lxv v31, 224(r1) # 16-byte Folded Reload
114 ; CHECK-PWR9-NEXT: lxv v30, 208(r1) # 16-byte Folded Reload
115 ; CHECK-PWR9-NEXT: add r3, r4, r3
116 ; CHECK-PWR9-NEXT: lxv v29, 192(r1) # 16-byte Folded Reload
117 ; CHECK-PWR9-NEXT: lxv v28, 176(r1) # 16-byte Folded Reload
118 ; CHECK-PWR9-NEXT: lxv v27, 160(r1) # 16-byte Folded Reload
119 ; CHECK-PWR9-NEXT: lxv v26, 144(r1) # 16-byte Folded Reload
120 ; CHECK-PWR9-NEXT: lxv v25, 128(r1) # 16-byte Folded Reload
121 ; CHECK-PWR9-NEXT: lxv v24, 112(r1) # 16-byte Folded Reload
122 ; CHECK-PWR9-NEXT: lxv v23, 96(r1) # 16-byte Folded Reload
123 ; CHECK-PWR9-NEXT: lxv v22, 80(r1) # 16-byte Folded Reload
124 ; CHECK-PWR9-NEXT: lxv v21, 64(r1) # 16-byte Folded Reload
125 ; CHECK-PWR9-NEXT: lxv v20, 48(r1) # 16-byte Folded Reload
126 ; CHECK-PWR9-NEXT: lfd f31, 520(r1) # 8-byte Folded Reload
127 ; CHECK-PWR9-NEXT: lfd f30, 512(r1) # 8-byte Folded Reload
128 ; CHECK-PWR9-NEXT: lfd f29, 504(r1) # 8-byte Folded Reload
129 ; CHECK-PWR9-NEXT: lfd f28, 496(r1) # 8-byte Folded Reload
130 ; CHECK-PWR9-NEXT: lfd f27, 488(r1) # 8-byte Folded Reload
131 ; CHECK-PWR9-NEXT: ld r31, 376(r1) # 8-byte Folded Reload
132 ; CHECK-PWR9-NEXT: ld r30, 368(r1) # 8-byte Folded Reload
133 ; CHECK-PWR9-NEXT: ld r29, 360(r1) # 8-byte Folded Reload
134 ; CHECK-PWR9-NEXT: ld r28, 352(r1) # 8-byte Folded Reload
135 ; CHECK-PWR9-NEXT: lfd f26, 480(r1) # 8-byte Folded Reload
136 ; CHECK-PWR9-NEXT: ld r27, 344(r1) # 8-byte Folded Reload
137 ; CHECK-PWR9-NEXT: ld r26, 336(r1) # 8-byte Folded Reload
138 ; CHECK-PWR9-NEXT: ld r25, 328(r1) # 8-byte Folded Reload
139 ; CHECK-PWR9-NEXT: lfd f25, 472(r1) # 8-byte Folded Reload
140 ; CHECK-PWR9-NEXT: ld r24, 320(r1) # 8-byte Folded Reload
141 ; CHECK-PWR9-NEXT: ld r23, 312(r1) # 8-byte Folded Reload
142 ; CHECK-PWR9-NEXT: ld r22, 304(r1) # 8-byte Folded Reload
143 ; CHECK-PWR9-NEXT: lfd f24, 464(r1) # 8-byte Folded Reload
144 ; CHECK-PWR9-NEXT: ld r21, 296(r1) # 8-byte Folded Reload
145 ; CHECK-PWR9-NEXT: ld r20, 288(r1) # 8-byte Folded Reload
146 ; CHECK-PWR9-NEXT: ld r19, 280(r1) # 8-byte Folded Reload
147 ; CHECK-PWR9-NEXT: lfd f23, 456(r1) # 8-byte Folded Reload
148 ; CHECK-PWR9-NEXT: ld r18, 272(r1) # 8-byte Folded Reload
149 ; CHECK-PWR9-NEXT: ld r17, 264(r1) # 8-byte Folded Reload
150 ; CHECK-PWR9-NEXT: ld r16, 256(r1) # 8-byte Folded Reload
151 ; CHECK-PWR9-NEXT: lfd f22, 448(r1) # 8-byte Folded Reload
152 ; CHECK-PWR9-NEXT: ld r15, 248(r1) # 8-byte Folded Reload
153 ; CHECK-PWR9-NEXT: ld r14, 240(r1) # 8-byte Folded Reload
154 ; CHECK-PWR9-NEXT: lfd f21, 440(r1) # 8-byte Folded Reload
155 ; CHECK-PWR9-NEXT: lfd f20, 432(r1) # 8-byte Folded Reload
156 ; CHECK-PWR9-NEXT: lfd f19, 424(r1) # 8-byte Folded Reload
157 ; CHECK-PWR9-NEXT: lfd f18, 416(r1) # 8-byte Folded Reload
158 ; CHECK-PWR9-NEXT: lfd f17, 408(r1) # 8-byte Folded Reload
159 ; CHECK-PWR9-NEXT: lfd f16, 400(r1) # 8-byte Folded Reload
160 ; CHECK-PWR9-NEXT: lfd f15, 392(r1) # 8-byte Folded Reload
161 ; CHECK-PWR9-NEXT: lfd f14, 384(r1) # 8-byte Folded Reload
162 ; CHECK-PWR9-NEXT: addi r1, r1, 528
163 ; CHECK-PWR9-NEXT: blr
165 tail call void asm sideeffect "nop", "~{r0},~{r1},~{r2},~{r3},~{r4},~{r5},~{r6},~{r7},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15},~{r16},~{r17},~{r18},~{r19},~{r20},~{r21},~{r22},~{r23},~{r24},~{r25},~{r26},~{r27},~{r28},~{r29},~{r30},~{r31},~{f0},~{f1},~{f2},~{f3},~{f4},~{f5},~{f6},~{f7},~{f8},~{f9},~{f10},~{f11},~{f12},~{f13},~{f14},~{f15},~{f16},~{f17},~{f18},~{f19},~{f20},~{f21},~{f22},~{f23},~{f24},~{f25},~{f26},~{f27},~{f28},~{f29},~{f30},~{f31},~{v0},~{v1},~{v2},~{v3},~{v4},~{v5},~{v6},~{v7},~{v8},~{v9},~{v10},~{v11},~{v12},~{v13},~{v14},~{v15},~{v16},~{v17},~{v18},~{v19},~{v20},~{v21},~{v22},~{v23},~{v24},~{v25},~{v26},~{v27},~{v28},~{v29},~{v30},~{v31}"() nounwind
166 %result = add i64 %p1, %p2