1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=aarch64 -mattr=+sve |\
3 ; RUN: FileCheck --check-prefixes=CHECK %s
5 define <vscale x 1 x iXLen> @lrint_v1f16(<vscale x 1 x half> %x) {
6 ; CHECK-LABEL: lrint_v1f16:
8 ; CHECK-NEXT: ptrue p0.d
9 ; CHECK-NEXT: mov w8, #64511 // =0xfbff
10 ; CHECK-NEXT: mov z2.d, #0x8000000000000000
11 ; CHECK-NEXT: mov z1.h, w8
12 ; CHECK-NEXT: mov w8, #31743 // =0x7bff
13 ; CHECK-NEXT: frintx z0.h, p0/m, z0.h
14 ; CHECK-NEXT: mov z3.h, w8
15 ; CHECK-NEXT: fcmge p1.h, p0/z, z0.h, z1.h
16 ; CHECK-NEXT: movprfx z1, z0
17 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z0.h
18 ; CHECK-NEXT: fcmgt p2.h, p0/z, z0.h, z3.h
19 ; CHECK-NEXT: mov z3.d, #0x7fffffffffffffff
20 ; CHECK-NEXT: not p1.b, p0/z, p1.b
21 ; CHECK-NEXT: fcmuo p0.h, p0/z, z0.h, z0.h
22 ; CHECK-NEXT: mov z1.d, p1/m, z2.d
23 ; CHECK-NEXT: sel z0.d, p2, z3.d, z1.d
24 ; CHECK-NEXT: mov z0.d, p0/m, #0 // =0x0
26 %a = call <vscale x 1 x iXLen> @llvm.lrint.nxv1iXLen.nxv1f16(<vscale x 1 x half> %x)
27 ret <vscale x 1 x iXLen> %a
29 declare <vscale x 1 x iXLen> @llvm.lrint.nxv1iXLen.nxv1f16(<vscale x 1 x half>)
31 define <vscale x 2 x iXLen> @lrint_v2f16(<vscale x 2 x half> %x) {
32 ; CHECK-LABEL: lrint_v2f16:
34 ; CHECK-NEXT: ptrue p0.d
35 ; CHECK-NEXT: mov w8, #64511 // =0xfbff
36 ; CHECK-NEXT: mov z2.d, #0x8000000000000000
37 ; CHECK-NEXT: mov z1.h, w8
38 ; CHECK-NEXT: mov w8, #31743 // =0x7bff
39 ; CHECK-NEXT: frintx z0.h, p0/m, z0.h
40 ; CHECK-NEXT: mov z3.h, w8
41 ; CHECK-NEXT: fcmge p1.h, p0/z, z0.h, z1.h
42 ; CHECK-NEXT: movprfx z1, z0
43 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z0.h
44 ; CHECK-NEXT: fcmgt p2.h, p0/z, z0.h, z3.h
45 ; CHECK-NEXT: mov z3.d, #0x7fffffffffffffff
46 ; CHECK-NEXT: not p1.b, p0/z, p1.b
47 ; CHECK-NEXT: fcmuo p0.h, p0/z, z0.h, z0.h
48 ; CHECK-NEXT: mov z1.d, p1/m, z2.d
49 ; CHECK-NEXT: sel z0.d, p2, z3.d, z1.d
50 ; CHECK-NEXT: mov z0.d, p0/m, #0 // =0x0
52 %a = call <vscale x 2 x iXLen> @llvm.lrint.nxv2iXLen.nxv2f16(<vscale x 2 x half> %x)
53 ret <vscale x 2 x iXLen> %a
55 declare <vscale x 2 x iXLen> @llvm.lrint.nxv2iXLen.nxv2f16(<vscale x 2 x half>)
57 define <vscale x 4 x iXLen> @lrint_v4f16(<vscale x 4 x half> %x) {
58 ; CHECK-LABEL: lrint_v4f16:
60 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
61 ; CHECK-NEXT: addvl sp, sp, #-1
62 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
63 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 8 * VG
64 ; CHECK-NEXT: .cfi_offset w29, -16
65 ; CHECK-NEXT: uunpklo z1.d, z0.s
66 ; CHECK-NEXT: uunpkhi z0.d, z0.s
67 ; CHECK-NEXT: mov w8, #64511 // =0xfbff
68 ; CHECK-NEXT: ptrue p0.d
69 ; CHECK-NEXT: mov z2.h, w8
70 ; CHECK-NEXT: mov w8, #31743 // =0x7bff
71 ; CHECK-NEXT: mov z3.h, w8
72 ; CHECK-NEXT: mov z6.d, #0x7fffffffffffffff
73 ; CHECK-NEXT: frintx z1.h, p0/m, z1.h
74 ; CHECK-NEXT: frintx z0.h, p0/m, z0.h
75 ; CHECK-NEXT: fcmge p1.h, p0/z, z1.h, z2.h
76 ; CHECK-NEXT: fcmge p2.h, p0/z, z0.h, z2.h
77 ; CHECK-NEXT: mov z2.d, #0x8000000000000000
78 ; CHECK-NEXT: movprfx z4, z1
79 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z1.h
80 ; CHECK-NEXT: movprfx z5, z0
81 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z0.h
82 ; CHECK-NEXT: fcmgt p3.h, p0/z, z1.h, z3.h
83 ; CHECK-NEXT: fcmgt p4.h, p0/z, z0.h, z3.h
84 ; CHECK-NEXT: not p1.b, p0/z, p1.b
85 ; CHECK-NEXT: not p2.b, p0/z, p2.b
86 ; CHECK-NEXT: sel z3.d, p1, z2.d, z4.d
87 ; CHECK-NEXT: fcmuo p1.h, p0/z, z1.h, z1.h
88 ; CHECK-NEXT: fcmuo p0.h, p0/z, z0.h, z0.h
89 ; CHECK-NEXT: sel z2.d, p2, z2.d, z5.d
90 ; CHECK-NEXT: sel z0.d, p3, z6.d, z3.d
91 ; CHECK-NEXT: sel z1.d, p4, z6.d, z2.d
92 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
93 ; CHECK-NEXT: mov z0.d, p1/m, #0 // =0x0
94 ; CHECK-NEXT: mov z1.d, p0/m, #0 // =0x0
95 ; CHECK-NEXT: addvl sp, sp, #1
96 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
98 %a = call <vscale x 4 x iXLen> @llvm.lrint.nxv4iXLen.nxv4f16(<vscale x 4 x half> %x)
99 ret <vscale x 4 x iXLen> %a
101 declare <vscale x 4 x iXLen> @llvm.lrint.nxv4iXLen.nxv4f16(<vscale x 4 x half>)
103 define <vscale x 8 x iXLen> @lrint_v8f16(<vscale x 8 x half> %x) {
104 ; CHECK-LABEL: lrint_v8f16:
106 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
107 ; CHECK-NEXT: addvl sp, sp, #-1
108 ; CHECK-NEXT: str p7, [sp, #4, mul vl] // 2-byte Folded Spill
109 ; CHECK-NEXT: str p6, [sp, #5, mul vl] // 2-byte Folded Spill
110 ; CHECK-NEXT: str p5, [sp, #6, mul vl] // 2-byte Folded Spill
111 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
112 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 8 * VG
113 ; CHECK-NEXT: .cfi_offset w29, -16
114 ; CHECK-NEXT: uunpklo z1.s, z0.h
115 ; CHECK-NEXT: uunpkhi z0.s, z0.h
116 ; CHECK-NEXT: mov w8, #64511 // =0xfbff
117 ; CHECK-NEXT: ptrue p0.d
118 ; CHECK-NEXT: mov z4.h, w8
119 ; CHECK-NEXT: mov w8, #31743 // =0x7bff
120 ; CHECK-NEXT: mov z6.h, w8
121 ; CHECK-NEXT: mov z26.d, #0x7fffffffffffffff
122 ; CHECK-NEXT: uunpklo z2.d, z1.s
123 ; CHECK-NEXT: uunpkhi z1.d, z1.s
124 ; CHECK-NEXT: uunpklo z3.d, z0.s
125 ; CHECK-NEXT: uunpkhi z0.d, z0.s
126 ; CHECK-NEXT: frintx z2.h, p0/m, z2.h
127 ; CHECK-NEXT: frintx z1.h, p0/m, z1.h
128 ; CHECK-NEXT: frintx z3.h, p0/m, z3.h
129 ; CHECK-NEXT: movprfx z5, z0
130 ; CHECK-NEXT: frintx z5.h, p0/m, z0.h
131 ; CHECK-NEXT: mov z0.d, #0x8000000000000000
132 ; CHECK-NEXT: fcmge p1.h, p0/z, z2.h, z4.h
133 ; CHECK-NEXT: fcmge p2.h, p0/z, z1.h, z4.h
134 ; CHECK-NEXT: fcmge p3.h, p0/z, z3.h, z4.h
135 ; CHECK-NEXT: fcmge p4.h, p0/z, z5.h, z4.h
136 ; CHECK-NEXT: movprfx z4, z2
137 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z2.h
138 ; CHECK-NEXT: movprfx z7, z1
139 ; CHECK-NEXT: fcvtzs z7.d, p0/m, z1.h
140 ; CHECK-NEXT: movprfx z24, z3
141 ; CHECK-NEXT: fcvtzs z24.d, p0/m, z3.h
142 ; CHECK-NEXT: movprfx z25, z5
143 ; CHECK-NEXT: fcvtzs z25.d, p0/m, z5.h
144 ; CHECK-NEXT: fcmgt p7.h, p0/z, z3.h, z6.h
145 ; CHECK-NEXT: fcmgt p5.h, p0/z, z2.h, z6.h
146 ; CHECK-NEXT: fcmgt p6.h, p0/z, z1.h, z6.h
147 ; CHECK-NEXT: not p1.b, p0/z, p1.b
148 ; CHECK-NEXT: not p2.b, p0/z, p2.b
149 ; CHECK-NEXT: not p3.b, p0/z, p3.b
150 ; CHECK-NEXT: mov z4.d, p1/m, z0.d
151 ; CHECK-NEXT: fcmgt p1.h, p0/z, z5.h, z6.h
152 ; CHECK-NEXT: not p4.b, p0/z, p4.b
153 ; CHECK-NEXT: sel z6.d, p2, z0.d, z7.d
154 ; CHECK-NEXT: fcmuo p2.h, p0/z, z2.h, z2.h
155 ; CHECK-NEXT: sel z7.d, p3, z0.d, z24.d
156 ; CHECK-NEXT: fcmuo p3.h, p0/z, z1.h, z1.h
157 ; CHECK-NEXT: sel z24.d, p4, z0.d, z25.d
158 ; CHECK-NEXT: fcmuo p4.h, p0/z, z3.h, z3.h
159 ; CHECK-NEXT: fcmuo p0.h, p0/z, z5.h, z5.h
160 ; CHECK-NEXT: sel z0.d, p5, z26.d, z4.d
161 ; CHECK-NEXT: sel z1.d, p6, z26.d, z6.d
162 ; CHECK-NEXT: ldr p6, [sp, #5, mul vl] // 2-byte Folded Reload
163 ; CHECK-NEXT: sel z2.d, p7, z26.d, z7.d
164 ; CHECK-NEXT: ldr p7, [sp, #4, mul vl] // 2-byte Folded Reload
165 ; CHECK-NEXT: sel z3.d, p1, z26.d, z24.d
166 ; CHECK-NEXT: ldr p5, [sp, #6, mul vl] // 2-byte Folded Reload
167 ; CHECK-NEXT: mov z0.d, p2/m, #0 // =0x0
168 ; CHECK-NEXT: mov z1.d, p3/m, #0 // =0x0
169 ; CHECK-NEXT: mov z2.d, p4/m, #0 // =0x0
170 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
171 ; CHECK-NEXT: mov z3.d, p0/m, #0 // =0x0
172 ; CHECK-NEXT: addvl sp, sp, #1
173 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
175 %a = call <vscale x 8 x iXLen> @llvm.lrint.nxv8iXLen.nxv8f16(<vscale x 8 x half> %x)
176 ret <vscale x 8 x iXLen> %a
178 declare <vscale x 8 x iXLen> @llvm.lrint.nxv8iXLen.nxv8f16(<vscale x 8 x half>)
180 define <vscale x 16 x iXLen> @lrint_v16f16(<vscale x 16 x half> %x) {
181 ; CHECK-LABEL: lrint_v16f16:
183 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
184 ; CHECK-NEXT: addvl sp, sp, #-3
185 ; CHECK-NEXT: str p10, [sp, #1, mul vl] // 2-byte Folded Spill
186 ; CHECK-NEXT: str p9, [sp, #2, mul vl] // 2-byte Folded Spill
187 ; CHECK-NEXT: str p8, [sp, #3, mul vl] // 2-byte Folded Spill
188 ; CHECK-NEXT: str p7, [sp, #4, mul vl] // 2-byte Folded Spill
189 ; CHECK-NEXT: str p6, [sp, #5, mul vl] // 2-byte Folded Spill
190 ; CHECK-NEXT: str p5, [sp, #6, mul vl] // 2-byte Folded Spill
191 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
192 ; CHECK-NEXT: str z9, [sp, #1, mul vl] // 16-byte Folded Spill
193 ; CHECK-NEXT: str z8, [sp, #2, mul vl] // 16-byte Folded Spill
194 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x18, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 24 * VG
195 ; CHECK-NEXT: .cfi_offset w29, -16
196 ; CHECK-NEXT: .cfi_escape 0x10, 0x48, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x78, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d8 @ cfa - 16 - 8 * VG
197 ; CHECK-NEXT: .cfi_escape 0x10, 0x49, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x70, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d9 @ cfa - 16 - 16 * VG
198 ; CHECK-NEXT: uunpklo z2.s, z0.h
199 ; CHECK-NEXT: uunpkhi z0.s, z0.h
200 ; CHECK-NEXT: mov w8, #64511 // =0xfbff
201 ; CHECK-NEXT: uunpklo z4.s, z1.h
202 ; CHECK-NEXT: ptrue p0.d
203 ; CHECK-NEXT: uunpkhi z1.s, z1.h
204 ; CHECK-NEXT: mov z5.h, w8
205 ; CHECK-NEXT: mov w8, #31743 // =0x7bff
206 ; CHECK-NEXT: mov z25.d, #0x8000000000000000
207 ; CHECK-NEXT: mov z27.h, w8
208 ; CHECK-NEXT: mov z7.d, #0x7fffffffffffffff
209 ; CHECK-NEXT: uunpklo z3.d, z2.s
210 ; CHECK-NEXT: uunpkhi z2.d, z2.s
211 ; CHECK-NEXT: uunpklo z6.d, z0.s
212 ; CHECK-NEXT: uunpkhi z0.d, z0.s
213 ; CHECK-NEXT: uunpklo z24.d, z4.s
214 ; CHECK-NEXT: uunpkhi z4.d, z4.s
215 ; CHECK-NEXT: uunpklo z26.d, z1.s
216 ; CHECK-NEXT: uunpkhi z1.d, z1.s
217 ; CHECK-NEXT: frintx z2.h, p0/m, z2.h
218 ; CHECK-NEXT: frintx z3.h, p0/m, z3.h
219 ; CHECK-NEXT: frintx z6.h, p0/m, z6.h
220 ; CHECK-NEXT: movprfx z28, z0
221 ; CHECK-NEXT: frintx z28.h, p0/m, z0.h
222 ; CHECK-NEXT: movprfx z29, z4
223 ; CHECK-NEXT: frintx z29.h, p0/m, z4.h
224 ; CHECK-NEXT: frintx z24.h, p0/m, z24.h
225 ; CHECK-NEXT: movprfx z30, z1
226 ; CHECK-NEXT: frintx z30.h, p0/m, z1.h
227 ; CHECK-NEXT: frintx z26.h, p0/m, z26.h
228 ; CHECK-NEXT: fcmge p5.h, p0/z, z2.h, z5.h
229 ; CHECK-NEXT: fcmge p2.h, p0/z, z3.h, z5.h
230 ; CHECK-NEXT: movprfx z1, z2
231 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z2.h
232 ; CHECK-NEXT: movprfx z0, z3
233 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z3.h
234 ; CHECK-NEXT: fcmge p6.h, p0/z, z6.h, z5.h
235 ; CHECK-NEXT: fcmgt p3.h, p0/z, z3.h, z27.h
236 ; CHECK-NEXT: fcmuo p1.h, p0/z, z3.h, z3.h
237 ; CHECK-NEXT: fcmge p7.h, p0/z, z28.h, z5.h
238 ; CHECK-NEXT: movprfx z3, z6
239 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z6.h
240 ; CHECK-NEXT: fcmge p8.h, p0/z, z24.h, z5.h
241 ; CHECK-NEXT: fcmgt p4.h, p0/z, z2.h, z27.h
242 ; CHECK-NEXT: fcmge p9.h, p0/z, z26.h, z5.h
243 ; CHECK-NEXT: not p5.b, p0/z, p5.b
244 ; CHECK-NEXT: movprfx z4, z24
245 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z24.h
246 ; CHECK-NEXT: fcmge p10.h, p0/z, z30.h, z5.h
247 ; CHECK-NEXT: not p2.b, p0/z, p2.b
248 ; CHECK-NEXT: movprfx z31, z26
249 ; CHECK-NEXT: fcvtzs z31.d, p0/m, z26.h
250 ; CHECK-NEXT: movprfx z8, z30
251 ; CHECK-NEXT: fcvtzs z8.d, p0/m, z30.h
252 ; CHECK-NEXT: mov z1.d, p5/m, z25.d
253 ; CHECK-NEXT: fcmge p5.h, p0/z, z29.h, z5.h
254 ; CHECK-NEXT: not p6.b, p0/z, p6.b
255 ; CHECK-NEXT: mov z0.d, p2/m, z25.d
256 ; CHECK-NEXT: fcmuo p2.h, p0/z, z2.h, z2.h
257 ; CHECK-NEXT: movprfx z2, z28
258 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z28.h
259 ; CHECK-NEXT: movprfx z5, z29
260 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z29.h
261 ; CHECK-NEXT: not p7.b, p0/z, p7.b
262 ; CHECK-NEXT: mov z3.d, p6/m, z25.d
263 ; CHECK-NEXT: not p6.b, p0/z, p8.b
264 ; CHECK-NEXT: fcmgt p8.h, p0/z, z6.h, z27.h
265 ; CHECK-NEXT: mov z1.d, p4/m, z7.d
266 ; CHECK-NEXT: not p5.b, p0/z, p5.b
267 ; CHECK-NEXT: mov z0.d, p3/m, z7.d
268 ; CHECK-NEXT: fcmgt p3.h, p0/z, z29.h, z27.h
269 ; CHECK-NEXT: sel z9.d, p7, z25.d, z2.d
270 ; CHECK-NEXT: not p7.b, p0/z, p9.b
271 ; CHECK-NEXT: mov z4.d, p6/m, z25.d
272 ; CHECK-NEXT: not p6.b, p0/z, p10.b
273 ; CHECK-NEXT: fcmgt p10.h, p0/z, z28.h, z27.h
274 ; CHECK-NEXT: mov z5.d, p5/m, z25.d
275 ; CHECK-NEXT: fcmgt p5.h, p0/z, z24.h, z27.h
276 ; CHECK-NEXT: fcmuo p9.h, p0/z, z6.h, z6.h
277 ; CHECK-NEXT: sel z6.d, p7, z25.d, z31.d
278 ; CHECK-NEXT: sel z25.d, p6, z25.d, z8.d
279 ; CHECK-NEXT: ldr z8, [sp, #2, mul vl] // 16-byte Folded Reload
280 ; CHECK-NEXT: fcmgt p6.h, p0/z, z26.h, z27.h
281 ; CHECK-NEXT: fcmgt p7.h, p0/z, z30.h, z27.h
282 ; CHECK-NEXT: fcmuo p4.h, p0/z, z28.h, z28.h
283 ; CHECK-NEXT: sel z2.d, p8, z7.d, z3.d
284 ; CHECK-NEXT: sel z3.d, p10, z7.d, z9.d
285 ; CHECK-NEXT: ldr z9, [sp, #1, mul vl] // 16-byte Folded Reload
286 ; CHECK-NEXT: fcmuo p8.h, p0/z, z29.h, z29.h
287 ; CHECK-NEXT: mov z4.d, p5/m, z7.d
288 ; CHECK-NEXT: fcmuo p5.h, p0/z, z24.h, z24.h
289 ; CHECK-NEXT: fcmuo p10.h, p0/z, z26.h, z26.h
290 ; CHECK-NEXT: mov z5.d, p3/m, z7.d
291 ; CHECK-NEXT: mov z6.d, p6/m, z7.d
292 ; CHECK-NEXT: ldr p6, [sp, #5, mul vl] // 2-byte Folded Reload
293 ; CHECK-NEXT: fcmuo p0.h, p0/z, z30.h, z30.h
294 ; CHECK-NEXT: sel z7.d, p7, z7.d, z25.d
295 ; CHECK-NEXT: ldr p7, [sp, #4, mul vl] // 2-byte Folded Reload
296 ; CHECK-NEXT: mov z2.d, p9/m, #0 // =0x0
297 ; CHECK-NEXT: ldr p9, [sp, #2, mul vl] // 2-byte Folded Reload
298 ; CHECK-NEXT: mov z3.d, p4/m, #0 // =0x0
299 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
300 ; CHECK-NEXT: mov z4.d, p5/m, #0 // =0x0
301 ; CHECK-NEXT: mov z5.d, p8/m, #0 // =0x0
302 ; CHECK-NEXT: ldr p8, [sp, #3, mul vl] // 2-byte Folded Reload
303 ; CHECK-NEXT: mov z6.d, p10/m, #0 // =0x0
304 ; CHECK-NEXT: mov z0.d, p1/m, #0 // =0x0
305 ; CHECK-NEXT: ldr p10, [sp, #1, mul vl] // 2-byte Folded Reload
306 ; CHECK-NEXT: mov z1.d, p2/m, #0 // =0x0
307 ; CHECK-NEXT: mov z7.d, p0/m, #0 // =0x0
308 ; CHECK-NEXT: ldr p5, [sp, #6, mul vl] // 2-byte Folded Reload
309 ; CHECK-NEXT: addvl sp, sp, #3
310 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
312 %a = call <vscale x 16 x iXLen> @llvm.lrint.nxv16iXLen.nxv16f16(<vscale x 16 x half> %x)
313 ret <vscale x 16 x iXLen> %a
315 declare <vscale x 16 x iXLen> @llvm.lrint.nxv16iXLen.nxv16f16(<vscale x 16 x half>)
317 define <vscale x 32 x iXLen> @lrint_v32f16(<vscale x 32 x half> %x) {
318 ; CHECK-LABEL: lrint_v32f16:
320 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
321 ; CHECK-NEXT: addvl sp, sp, #-17
322 ; CHECK-NEXT: str p9, [sp, #2, mul vl] // 2-byte Folded Spill
323 ; CHECK-NEXT: str p8, [sp, #3, mul vl] // 2-byte Folded Spill
324 ; CHECK-NEXT: str p7, [sp, #4, mul vl] // 2-byte Folded Spill
325 ; CHECK-NEXT: str p6, [sp, #5, mul vl] // 2-byte Folded Spill
326 ; CHECK-NEXT: str p5, [sp, #6, mul vl] // 2-byte Folded Spill
327 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
328 ; CHECK-NEXT: str z23, [sp, #1, mul vl] // 16-byte Folded Spill
329 ; CHECK-NEXT: str z22, [sp, #2, mul vl] // 16-byte Folded Spill
330 ; CHECK-NEXT: str z21, [sp, #3, mul vl] // 16-byte Folded Spill
331 ; CHECK-NEXT: str z20, [sp, #4, mul vl] // 16-byte Folded Spill
332 ; CHECK-NEXT: str z19, [sp, #5, mul vl] // 16-byte Folded Spill
333 ; CHECK-NEXT: str z18, [sp, #6, mul vl] // 16-byte Folded Spill
334 ; CHECK-NEXT: str z17, [sp, #7, mul vl] // 16-byte Folded Spill
335 ; CHECK-NEXT: str z16, [sp, #8, mul vl] // 16-byte Folded Spill
336 ; CHECK-NEXT: str z15, [sp, #9, mul vl] // 16-byte Folded Spill
337 ; CHECK-NEXT: str z14, [sp, #10, mul vl] // 16-byte Folded Spill
338 ; CHECK-NEXT: str z13, [sp, #11, mul vl] // 16-byte Folded Spill
339 ; CHECK-NEXT: str z12, [sp, #12, mul vl] // 16-byte Folded Spill
340 ; CHECK-NEXT: str z11, [sp, #13, mul vl] // 16-byte Folded Spill
341 ; CHECK-NEXT: str z10, [sp, #14, mul vl] // 16-byte Folded Spill
342 ; CHECK-NEXT: str z9, [sp, #15, mul vl] // 16-byte Folded Spill
343 ; CHECK-NEXT: str z8, [sp, #16, mul vl] // 16-byte Folded Spill
344 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x88, 0x01, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 136 * VG
345 ; CHECK-NEXT: .cfi_offset w29, -16
346 ; CHECK-NEXT: .cfi_escape 0x10, 0x48, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x78, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d8 @ cfa - 16 - 8 * VG
347 ; CHECK-NEXT: .cfi_escape 0x10, 0x49, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x70, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d9 @ cfa - 16 - 16 * VG
348 ; CHECK-NEXT: .cfi_escape 0x10, 0x4a, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x68, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d10 @ cfa - 16 - 24 * VG
349 ; CHECK-NEXT: .cfi_escape 0x10, 0x4b, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x60, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d11 @ cfa - 16 - 32 * VG
350 ; CHECK-NEXT: .cfi_escape 0x10, 0x4c, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x58, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d12 @ cfa - 16 - 40 * VG
351 ; CHECK-NEXT: .cfi_escape 0x10, 0x4d, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x50, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d13 @ cfa - 16 - 48 * VG
352 ; CHECK-NEXT: .cfi_escape 0x10, 0x4e, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x48, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d14 @ cfa - 16 - 56 * VG
353 ; CHECK-NEXT: .cfi_escape 0x10, 0x4f, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x40, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d15 @ cfa - 16 - 64 * VG
354 ; CHECK-NEXT: uunpkhi z5.s, z0.h
355 ; CHECK-NEXT: uunpklo z4.s, z0.h
356 ; CHECK-NEXT: mov w9, #64511 // =0xfbff
357 ; CHECK-NEXT: ptrue p0.d
358 ; CHECK-NEXT: uunpklo z6.s, z1.h
359 ; CHECK-NEXT: mov z30.h, w9
360 ; CHECK-NEXT: uunpkhi z10.s, z1.h
361 ; CHECK-NEXT: mov w9, #31743 // =0x7bff
362 ; CHECK-NEXT: mov z29.d, #0x8000000000000000
363 ; CHECK-NEXT: uunpklo z8.s, z2.h
364 ; CHECK-NEXT: uunpkhi z13.s, z3.h
365 ; CHECK-NEXT: uunpklo z18.s, z3.h
366 ; CHECK-NEXT: uunpklo z7.d, z5.s
367 ; CHECK-NEXT: uunpklo z0.d, z4.s
368 ; CHECK-NEXT: uunpkhi z4.d, z4.s
369 ; CHECK-NEXT: uunpkhi z24.d, z5.s
370 ; CHECK-NEXT: uunpklo z25.d, z6.s
371 ; CHECK-NEXT: uunpkhi z26.d, z6.s
372 ; CHECK-NEXT: uunpklo z27.d, z10.s
373 ; CHECK-NEXT: uunpkhi z10.d, z10.s
374 ; CHECK-NEXT: uunpklo z12.d, z8.s
375 ; CHECK-NEXT: uunpkhi z16.d, z8.s
376 ; CHECK-NEXT: movprfx z5, z7
377 ; CHECK-NEXT: frintx z5.h, p0/m, z7.h
378 ; CHECK-NEXT: movprfx z1, z4
379 ; CHECK-NEXT: frintx z1.h, p0/m, z4.h
380 ; CHECK-NEXT: frintx z0.h, p0/m, z0.h
381 ; CHECK-NEXT: movprfx z6, z24
382 ; CHECK-NEXT: frintx z6.h, p0/m, z24.h
383 ; CHECK-NEXT: movprfx z24, z25
384 ; CHECK-NEXT: frintx z24.h, p0/m, z25.h
385 ; CHECK-NEXT: movprfx z25, z26
386 ; CHECK-NEXT: frintx z25.h, p0/m, z26.h
387 ; CHECK-NEXT: movprfx z28, z27
388 ; CHECK-NEXT: frintx z28.h, p0/m, z27.h
389 ; CHECK-NEXT: movprfx z8, z10
390 ; CHECK-NEXT: frintx z8.h, p0/m, z10.h
391 ; CHECK-NEXT: mov z7.h, w9
392 ; CHECK-NEXT: mov z4.d, #0x7fffffffffffffff
393 ; CHECK-NEXT: rdvl x9, #15
394 ; CHECK-NEXT: fcmge p3.h, p0/z, z5.h, z30.h
395 ; CHECK-NEXT: movprfx z11, z5
396 ; CHECK-NEXT: fcvtzs z11.d, p0/m, z5.h
397 ; CHECK-NEXT: fcmge p2.h, p0/z, z1.h, z30.h
398 ; CHECK-NEXT: fcmge p1.h, p0/z, z0.h, z30.h
399 ; CHECK-NEXT: fcmge p4.h, p0/z, z6.h, z30.h
400 ; CHECK-NEXT: movprfx z9, z6
401 ; CHECK-NEXT: fcvtzs z9.d, p0/m, z6.h
402 ; CHECK-NEXT: movprfx z15, z25
403 ; CHECK-NEXT: fcvtzs z15.d, p0/m, z25.h
404 ; CHECK-NEXT: movprfx z14, z24
405 ; CHECK-NEXT: fcvtzs z14.d, p0/m, z24.h
406 ; CHECK-NEXT: movprfx z26, z0
407 ; CHECK-NEXT: fcvtzs z26.d, p0/m, z0.h
408 ; CHECK-NEXT: movprfx z19, z28
409 ; CHECK-NEXT: fcvtzs z19.d, p0/m, z28.h
410 ; CHECK-NEXT: movprfx z31, z1
411 ; CHECK-NEXT: fcvtzs z31.d, p0/m, z1.h
412 ; CHECK-NEXT: not p3.b, p0/z, p3.b
413 ; CHECK-NEXT: not p6.b, p0/z, p2.b
414 ; CHECK-NEXT: fcmge p2.h, p0/z, z25.h, z30.h
415 ; CHECK-NEXT: sel z27.d, p3, z29.d, z11.d
416 ; CHECK-NEXT: uunpkhi z11.s, z2.h
417 ; CHECK-NEXT: not p5.b, p0/z, p1.b
418 ; CHECK-NEXT: fcmge p1.h, p0/z, z24.h, z30.h
419 ; CHECK-NEXT: not p3.b, p0/z, p4.b
420 ; CHECK-NEXT: fcmge p4.h, p0/z, z28.h, z30.h
421 ; CHECK-NEXT: mov z26.d, p5/m, z29.d
422 ; CHECK-NEXT: mov z31.d, p6/m, z29.d
423 ; CHECK-NEXT: sel z2.d, p3, z29.d, z9.d
424 ; CHECK-NEXT: movprfx z9, z12
425 ; CHECK-NEXT: frintx z9.h, p0/m, z12.h
426 ; CHECK-NEXT: uunpkhi z12.d, z13.s
427 ; CHECK-NEXT: uunpklo z17.d, z11.s
428 ; CHECK-NEXT: not p2.b, p0/z, p2.b
429 ; CHECK-NEXT: not p1.b, p0/z, p1.b
430 ; CHECK-NEXT: sel z3.d, p2, z29.d, z15.d
431 ; CHECK-NEXT: uunpklo z15.d, z13.s
432 ; CHECK-NEXT: fcmge p2.h, p0/z, z8.h, z30.h
433 ; CHECK-NEXT: sel z10.d, p1, z29.d, z14.d
434 ; CHECK-NEXT: movprfx z14, z16
435 ; CHECK-NEXT: frintx z14.h, p0/m, z16.h
436 ; CHECK-NEXT: uunpkhi z16.d, z18.s
437 ; CHECK-NEXT: movprfx z13, z17
438 ; CHECK-NEXT: frintx z13.h, p0/m, z17.h
439 ; CHECK-NEXT: movprfx z20, z12
440 ; CHECK-NEXT: frintx z20.h, p0/m, z12.h
441 ; CHECK-NEXT: fcmge p3.h, p0/z, z9.h, z30.h
442 ; CHECK-NEXT: uunpkhi z17.d, z11.s
443 ; CHECK-NEXT: uunpklo z18.d, z18.s
444 ; CHECK-NEXT: movprfx z12, z8
445 ; CHECK-NEXT: fcvtzs z12.d, p0/m, z8.h
446 ; CHECK-NEXT: movprfx z21, z15
447 ; CHECK-NEXT: frintx z21.h, p0/m, z15.h
448 ; CHECK-NEXT: not p1.b, p0/z, p4.b
449 ; CHECK-NEXT: movprfx z15, z9
450 ; CHECK-NEXT: fcvtzs z15.d, p0/m, z9.h
451 ; CHECK-NEXT: frintx z16.h, p0/m, z16.h
452 ; CHECK-NEXT: not p2.b, p0/z, p2.b
453 ; CHECK-NEXT: movprfx z22, z14
454 ; CHECK-NEXT: fcvtzs z22.d, p0/m, z14.h
455 ; CHECK-NEXT: fcmge p4.h, p0/z, z13.h, z30.h
456 ; CHECK-NEXT: fcmge p5.h, p0/z, z20.h, z30.h
457 ; CHECK-NEXT: sel z11.d, p1, z29.d, z19.d
458 ; CHECK-NEXT: not p3.b, p0/z, p3.b
459 ; CHECK-NEXT: frintx z17.h, p0/m, z17.h
460 ; CHECK-NEXT: frintx z18.h, p0/m, z18.h
461 ; CHECK-NEXT: movprfx z19, z20
462 ; CHECK-NEXT: fcvtzs z19.d, p0/m, z20.h
463 ; CHECK-NEXT: mov z12.d, p2/m, z29.d
464 ; CHECK-NEXT: fcmge p2.h, p0/z, z21.h, z30.h
465 ; CHECK-NEXT: fcmge p1.h, p0/z, z14.h, z30.h
466 ; CHECK-NEXT: mov z15.d, p3/m, z29.d
467 ; CHECK-NEXT: movprfx z23, z21
468 ; CHECK-NEXT: fcvtzs z23.d, p0/m, z21.h
469 ; CHECK-NEXT: not p3.b, p0/z, p4.b
470 ; CHECK-NEXT: fcmge p4.h, p0/z, z16.h, z30.h
471 ; CHECK-NEXT: fcmgt p8.h, p0/z, z21.h, z7.h
472 ; CHECK-NEXT: not p5.b, p0/z, p5.b
473 ; CHECK-NEXT: fcmge p6.h, p0/z, z17.h, z30.h
474 ; CHECK-NEXT: fcmge p7.h, p0/z, z18.h, z30.h
475 ; CHECK-NEXT: movprfx z30, z16
476 ; CHECK-NEXT: fcvtzs z30.d, p0/m, z16.h
477 ; CHECK-NEXT: not p2.b, p0/z, p2.b
478 ; CHECK-NEXT: fcmuo p9.h, p0/z, z21.h, z21.h
479 ; CHECK-NEXT: mov z19.d, p5/m, z29.d
480 ; CHECK-NEXT: fcmgt p5.h, p0/z, z20.h, z7.h
481 ; CHECK-NEXT: not p1.b, p0/z, p1.b
482 ; CHECK-NEXT: not p4.b, p0/z, p4.b
483 ; CHECK-NEXT: mov z23.d, p2/m, z29.d
484 ; CHECK-NEXT: fcmuo p2.h, p0/z, z20.h, z20.h
485 ; CHECK-NEXT: movprfx z20, z18
486 ; CHECK-NEXT: fcvtzs z20.d, p0/m, z18.h
487 ; CHECK-NEXT: movprfx z21, z13
488 ; CHECK-NEXT: fcvtzs z21.d, p0/m, z13.h
489 ; CHECK-NEXT: mov z22.d, p1/m, z29.d
490 ; CHECK-NEXT: not p1.b, p0/z, p7.b
491 ; CHECK-NEXT: mov z30.d, p4/m, z29.d
492 ; CHECK-NEXT: fcmgt p4.h, p0/z, z18.h, z7.h
493 ; CHECK-NEXT: mov z19.d, p5/m, z4.d
494 ; CHECK-NEXT: fcmuo p7.h, p0/z, z18.h, z18.h
495 ; CHECK-NEXT: movprfx z18, z17
496 ; CHECK-NEXT: fcvtzs z18.d, p0/m, z17.h
497 ; CHECK-NEXT: fcmgt p5.h, p0/z, z16.h, z7.h
498 ; CHECK-NEXT: not p6.b, p0/z, p6.b
499 ; CHECK-NEXT: mov z23.d, p8/m, z4.d
500 ; CHECK-NEXT: mov z20.d, p1/m, z29.d
501 ; CHECK-NEXT: mov z21.d, p3/m, z29.d
502 ; CHECK-NEXT: fcmuo p3.h, p0/z, z16.h, z16.h
503 ; CHECK-NEXT: mov z19.d, p2/m, #0 // =0x0
504 ; CHECK-NEXT: fcmgt p2.h, p0/z, z17.h, z7.h
505 ; CHECK-NEXT: ptrue p1.b
506 ; CHECK-NEXT: sel z29.d, p6, z29.d, z18.d
507 ; CHECK-NEXT: mov z23.d, p9/m, #0 // =0x0
508 ; CHECK-NEXT: fcmgt p6.h, p0/z, z14.h, z7.h
509 ; CHECK-NEXT: mov z30.d, p5/m, z4.d
510 ; CHECK-NEXT: sel z16.d, p4, z4.d, z20.d
511 ; CHECK-NEXT: fcmuo p4.h, p0/z, z17.h, z17.h
512 ; CHECK-NEXT: st1b { z19.b }, p1, [x8, x9]
513 ; CHECK-NEXT: rdvl x9, #14
514 ; CHECK-NEXT: fcmgt p5.h, p0/z, z1.h, z7.h
515 ; CHECK-NEXT: st1b { z23.b }, p1, [x8, x9]
516 ; CHECK-NEXT: rdvl x9, #13
517 ; CHECK-NEXT: mov z29.d, p2/m, z4.d
518 ; CHECK-NEXT: mov z30.d, p3/m, #0 // =0x0
519 ; CHECK-NEXT: fcmgt p3.h, p0/z, z13.h, z7.h
520 ; CHECK-NEXT: mov z16.d, p7/m, #0 // =0x0
521 ; CHECK-NEXT: fcmgt p2.h, p0/z, z9.h, z7.h
522 ; CHECK-NEXT: fcmuo p7.h, p0/z, z14.h, z14.h
523 ; CHECK-NEXT: mov z29.d, p4/m, #0 // =0x0
524 ; CHECK-NEXT: fcmuo p4.h, p0/z, z13.h, z13.h
525 ; CHECK-NEXT: st1b { z30.b }, p1, [x8, x9]
526 ; CHECK-NEXT: rdvl x9, #12
527 ; CHECK-NEXT: sel z30.d, p5, z4.d, z31.d
528 ; CHECK-NEXT: st1b { z16.b }, p1, [x8, x9]
529 ; CHECK-NEXT: rdvl x9, #11
530 ; CHECK-NEXT: sel z31.d, p3, z4.d, z21.d
531 ; CHECK-NEXT: st1b { z29.b }, p1, [x8, x9]
532 ; CHECK-NEXT: rdvl x9, #10
533 ; CHECK-NEXT: fcmgt p5.h, p0/z, z24.h, z7.h
534 ; CHECK-NEXT: fcmgt p3.h, p0/z, z28.h, z7.h
535 ; CHECK-NEXT: sel z13.d, p2, z4.d, z15.d
536 ; CHECK-NEXT: fcmuo p2.h, p0/z, z9.h, z9.h
537 ; CHECK-NEXT: sel z29.d, p6, z4.d, z22.d
538 ; CHECK-NEXT: mov z31.d, p4/m, #0 // =0x0
539 ; CHECK-NEXT: fcmgt p4.h, p0/z, z8.h, z7.h
540 ; CHECK-NEXT: fcmgt p6.h, p0/z, z5.h, z7.h
541 ; CHECK-NEXT: sel z9.d, p5, z4.d, z10.d
542 ; CHECK-NEXT: fcmgt p5.h, p0/z, z6.h, z7.h
543 ; CHECK-NEXT: st1b { z31.b }, p1, [x8, x9]
544 ; CHECK-NEXT: rdvl x9, #9
545 ; CHECK-NEXT: mov z29.d, p7/m, #0 // =0x0
546 ; CHECK-NEXT: sel z10.d, p3, z4.d, z11.d
547 ; CHECK-NEXT: fcmgt p3.h, p0/z, z25.h, z7.h
548 ; CHECK-NEXT: mov z13.d, p2/m, #0 // =0x0
549 ; CHECK-NEXT: fcmuo p7.h, p0/z, z8.h, z8.h
550 ; CHECK-NEXT: fcmuo p2.h, p0/z, z28.h, z28.h
551 ; CHECK-NEXT: sel z28.d, p4, z4.d, z12.d
552 ; CHECK-NEXT: st1b { z29.b }, p1, [x8, x9]
553 ; CHECK-NEXT: rdvl x9, #8
554 ; CHECK-NEXT: fcmuo p4.h, p0/z, z25.h, z25.h
555 ; CHECK-NEXT: st1b { z13.b }, p1, [x8, x9]
556 ; CHECK-NEXT: fcmuo p1.h, p0/z, z24.h, z24.h
557 ; CHECK-NEXT: mov z2.d, p5/m, z4.d
558 ; CHECK-NEXT: mov z3.d, p3/m, z4.d
559 ; CHECK-NEXT: fcmgt p3.h, p0/z, z0.h, z7.h
560 ; CHECK-NEXT: mov z28.d, p7/m, #0 // =0x0
561 ; CHECK-NEXT: fcmuo p7.h, p0/z, z6.h, z6.h
562 ; CHECK-NEXT: mov z10.d, p2/m, #0 // =0x0
563 ; CHECK-NEXT: fcmuo p2.h, p0/z, z5.h, z5.h
564 ; CHECK-NEXT: sel z5.d, p6, z4.d, z27.d
565 ; CHECK-NEXT: mov z3.d, p4/m, #0 // =0x0
566 ; CHECK-NEXT: fcmuo p4.h, p0/z, z1.h, z1.h
567 ; CHECK-NEXT: mov z9.d, p1/m, #0 // =0x0
568 ; CHECK-NEXT: st1d { z28.d }, p0, [x8, #7, mul vl]
569 ; CHECK-NEXT: fcmuo p1.h, p0/z, z0.h, z0.h
570 ; CHECK-NEXT: sel z0.d, p3, z4.d, z26.d
571 ; CHECK-NEXT: st1d { z10.d }, p0, [x8, #6, mul vl]
572 ; CHECK-NEXT: mov z2.d, p7/m, #0 // =0x0
573 ; CHECK-NEXT: st1d { z3.d }, p0, [x8, #5, mul vl]
574 ; CHECK-NEXT: mov z5.d, p2/m, #0 // =0x0
575 ; CHECK-NEXT: st1d { z9.d }, p0, [x8, #4, mul vl]
576 ; CHECK-NEXT: mov z30.d, p4/m, #0 // =0x0
577 ; CHECK-NEXT: mov z0.d, p1/m, #0 // =0x0
578 ; CHECK-NEXT: st1d { z2.d }, p0, [x8, #3, mul vl]
579 ; CHECK-NEXT: st1d { z5.d }, p0, [x8, #2, mul vl]
580 ; CHECK-NEXT: st1d { z30.d }, p0, [x8, #1, mul vl]
581 ; CHECK-NEXT: st1d { z0.d }, p0, [x8]
582 ; CHECK-NEXT: ldr z23, [sp, #1, mul vl] // 16-byte Folded Reload
583 ; CHECK-NEXT: ldr z22, [sp, #2, mul vl] // 16-byte Folded Reload
584 ; CHECK-NEXT: ldr z21, [sp, #3, mul vl] // 16-byte Folded Reload
585 ; CHECK-NEXT: ldr z20, [sp, #4, mul vl] // 16-byte Folded Reload
586 ; CHECK-NEXT: ldr z19, [sp, #5, mul vl] // 16-byte Folded Reload
587 ; CHECK-NEXT: ldr z18, [sp, #6, mul vl] // 16-byte Folded Reload
588 ; CHECK-NEXT: ldr z17, [sp, #7, mul vl] // 16-byte Folded Reload
589 ; CHECK-NEXT: ldr z16, [sp, #8, mul vl] // 16-byte Folded Reload
590 ; CHECK-NEXT: ldr z15, [sp, #9, mul vl] // 16-byte Folded Reload
591 ; CHECK-NEXT: ldr z14, [sp, #10, mul vl] // 16-byte Folded Reload
592 ; CHECK-NEXT: ldr z13, [sp, #11, mul vl] // 16-byte Folded Reload
593 ; CHECK-NEXT: ldr z12, [sp, #12, mul vl] // 16-byte Folded Reload
594 ; CHECK-NEXT: ldr z11, [sp, #13, mul vl] // 16-byte Folded Reload
595 ; CHECK-NEXT: ldr z10, [sp, #14, mul vl] // 16-byte Folded Reload
596 ; CHECK-NEXT: ldr z9, [sp, #15, mul vl] // 16-byte Folded Reload
597 ; CHECK-NEXT: ldr z8, [sp, #16, mul vl] // 16-byte Folded Reload
598 ; CHECK-NEXT: ldr p9, [sp, #2, mul vl] // 2-byte Folded Reload
599 ; CHECK-NEXT: ldr p8, [sp, #3, mul vl] // 2-byte Folded Reload
600 ; CHECK-NEXT: ldr p7, [sp, #4, mul vl] // 2-byte Folded Reload
601 ; CHECK-NEXT: ldr p6, [sp, #5, mul vl] // 2-byte Folded Reload
602 ; CHECK-NEXT: ldr p5, [sp, #6, mul vl] // 2-byte Folded Reload
603 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
604 ; CHECK-NEXT: addvl sp, sp, #17
605 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
607 %a = call <vscale x 32 x iXLen> @llvm.lrint.nxv32iXLen.nxv32f16(<vscale x 32 x half> %x)
608 ret <vscale x 32 x iXLen> %a
610 declare <vscale x 32 x iXLen> @llvm.lrint.nxv32iXLen.nxv32f16(<vscale x 32 x half>)
612 define <vscale x 1 x iXLen> @lrint_v1f32(<vscale x 1 x float> %x) {
613 ; CHECK-LABEL: lrint_v1f32:
615 ; CHECK-NEXT: ptrue p0.d
616 ; CHECK-NEXT: mov w8, #-553648128 // =0xdf000000
617 ; CHECK-NEXT: mov z2.d, #0x8000000000000000
618 ; CHECK-NEXT: mov z1.s, w8
619 ; CHECK-NEXT: mov w8, #1593835519 // =0x5effffff
620 ; CHECK-NEXT: frintx z0.s, p0/m, z0.s
621 ; CHECK-NEXT: mov z3.s, w8
622 ; CHECK-NEXT: fcmge p1.s, p0/z, z0.s, z1.s
623 ; CHECK-NEXT: movprfx z1, z0
624 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z0.s
625 ; CHECK-NEXT: fcmgt p2.s, p0/z, z0.s, z3.s
626 ; CHECK-NEXT: mov z3.d, #0x7fffffffffffffff
627 ; CHECK-NEXT: not p1.b, p0/z, p1.b
628 ; CHECK-NEXT: fcmuo p0.s, p0/z, z0.s, z0.s
629 ; CHECK-NEXT: mov z1.d, p1/m, z2.d
630 ; CHECK-NEXT: sel z0.d, p2, z3.d, z1.d
631 ; CHECK-NEXT: mov z0.d, p0/m, #0 // =0x0
633 %a = call <vscale x 1 x iXLen> @llvm.lrint.nxv1iXLen.nxv1f32(<vscale x 1 x float> %x)
634 ret <vscale x 1 x iXLen> %a
636 declare <vscale x 1 x iXLen> @llvm.lrint.nxv1iXLen.nxv1f32(<vscale x 1 x float>)
638 define <vscale x 2 x iXLen> @lrint_v2f32(<vscale x 2 x float> %x) {
639 ; CHECK-LABEL: lrint_v2f32:
641 ; CHECK-NEXT: ptrue p0.d
642 ; CHECK-NEXT: mov w8, #-553648128 // =0xdf000000
643 ; CHECK-NEXT: mov z2.d, #0x8000000000000000
644 ; CHECK-NEXT: mov z1.s, w8
645 ; CHECK-NEXT: mov w8, #1593835519 // =0x5effffff
646 ; CHECK-NEXT: frintx z0.s, p0/m, z0.s
647 ; CHECK-NEXT: mov z3.s, w8
648 ; CHECK-NEXT: fcmge p1.s, p0/z, z0.s, z1.s
649 ; CHECK-NEXT: movprfx z1, z0
650 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z0.s
651 ; CHECK-NEXT: fcmgt p2.s, p0/z, z0.s, z3.s
652 ; CHECK-NEXT: mov z3.d, #0x7fffffffffffffff
653 ; CHECK-NEXT: not p1.b, p0/z, p1.b
654 ; CHECK-NEXT: fcmuo p0.s, p0/z, z0.s, z0.s
655 ; CHECK-NEXT: mov z1.d, p1/m, z2.d
656 ; CHECK-NEXT: sel z0.d, p2, z3.d, z1.d
657 ; CHECK-NEXT: mov z0.d, p0/m, #0 // =0x0
659 %a = call <vscale x 2 x iXLen> @llvm.lrint.nxv2iXLen.nxv2f32(<vscale x 2 x float> %x)
660 ret <vscale x 2 x iXLen> %a
662 declare <vscale x 2 x iXLen> @llvm.lrint.nxv2iXLen.nxv2f32(<vscale x 2 x float>)
664 define <vscale x 4 x iXLen> @lrint_v4f32(<vscale x 4 x float> %x) {
665 ; CHECK-LABEL: lrint_v4f32:
667 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
668 ; CHECK-NEXT: addvl sp, sp, #-1
669 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
670 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 8 * VG
671 ; CHECK-NEXT: .cfi_offset w29, -16
672 ; CHECK-NEXT: uunpklo z1.d, z0.s
673 ; CHECK-NEXT: uunpkhi z0.d, z0.s
674 ; CHECK-NEXT: mov w8, #-553648128 // =0xdf000000
675 ; CHECK-NEXT: ptrue p0.d
676 ; CHECK-NEXT: mov z2.s, w8
677 ; CHECK-NEXT: mov w8, #1593835519 // =0x5effffff
678 ; CHECK-NEXT: mov z3.s, w8
679 ; CHECK-NEXT: mov z6.d, #0x7fffffffffffffff
680 ; CHECK-NEXT: frintx z1.s, p0/m, z1.s
681 ; CHECK-NEXT: frintx z0.s, p0/m, z0.s
682 ; CHECK-NEXT: fcmge p1.s, p0/z, z1.s, z2.s
683 ; CHECK-NEXT: fcmge p2.s, p0/z, z0.s, z2.s
684 ; CHECK-NEXT: mov z2.d, #0x8000000000000000
685 ; CHECK-NEXT: movprfx z4, z1
686 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z1.s
687 ; CHECK-NEXT: movprfx z5, z0
688 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z0.s
689 ; CHECK-NEXT: fcmgt p3.s, p0/z, z1.s, z3.s
690 ; CHECK-NEXT: fcmgt p4.s, p0/z, z0.s, z3.s
691 ; CHECK-NEXT: not p1.b, p0/z, p1.b
692 ; CHECK-NEXT: not p2.b, p0/z, p2.b
693 ; CHECK-NEXT: sel z3.d, p1, z2.d, z4.d
694 ; CHECK-NEXT: fcmuo p1.s, p0/z, z1.s, z1.s
695 ; CHECK-NEXT: fcmuo p0.s, p0/z, z0.s, z0.s
696 ; CHECK-NEXT: sel z2.d, p2, z2.d, z5.d
697 ; CHECK-NEXT: sel z0.d, p3, z6.d, z3.d
698 ; CHECK-NEXT: sel z1.d, p4, z6.d, z2.d
699 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
700 ; CHECK-NEXT: mov z0.d, p1/m, #0 // =0x0
701 ; CHECK-NEXT: mov z1.d, p0/m, #0 // =0x0
702 ; CHECK-NEXT: addvl sp, sp, #1
703 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
705 %a = call <vscale x 4 x iXLen> @llvm.lrint.nxv4iXLen.nxv4f32(<vscale x 4 x float> %x)
706 ret <vscale x 4 x iXLen> %a
708 declare <vscale x 4 x iXLen> @llvm.lrint.nxv4iXLen.nxv4f32(<vscale x 4 x float>)
710 define <vscale x 8 x iXLen> @lrint_v8f32(<vscale x 8 x float> %x) {
711 ; CHECK-LABEL: lrint_v8f32:
713 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
714 ; CHECK-NEXT: addvl sp, sp, #-1
715 ; CHECK-NEXT: str p7, [sp, #4, mul vl] // 2-byte Folded Spill
716 ; CHECK-NEXT: str p6, [sp, #5, mul vl] // 2-byte Folded Spill
717 ; CHECK-NEXT: str p5, [sp, #6, mul vl] // 2-byte Folded Spill
718 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
719 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 8 * VG
720 ; CHECK-NEXT: .cfi_offset w29, -16
721 ; CHECK-NEXT: uunpklo z2.d, z0.s
722 ; CHECK-NEXT: uunpkhi z0.d, z0.s
723 ; CHECK-NEXT: mov w8, #-553648128 // =0xdf000000
724 ; CHECK-NEXT: uunpklo z3.d, z1.s
725 ; CHECK-NEXT: ptrue p0.d
726 ; CHECK-NEXT: uunpkhi z1.d, z1.s
727 ; CHECK-NEXT: mov z4.s, w8
728 ; CHECK-NEXT: mov w8, #1593835519 // =0x5effffff
729 ; CHECK-NEXT: mov z5.d, #0x8000000000000000
730 ; CHECK-NEXT: mov z6.s, w8
731 ; CHECK-NEXT: mov z26.d, #0x7fffffffffffffff
732 ; CHECK-NEXT: frintx z2.s, p0/m, z2.s
733 ; CHECK-NEXT: frintx z0.s, p0/m, z0.s
734 ; CHECK-NEXT: frintx z3.s, p0/m, z3.s
735 ; CHECK-NEXT: frintx z1.s, p0/m, z1.s
736 ; CHECK-NEXT: fcmge p1.s, p0/z, z2.s, z4.s
737 ; CHECK-NEXT: fcmge p2.s, p0/z, z0.s, z4.s
738 ; CHECK-NEXT: movprfx z7, z0
739 ; CHECK-NEXT: fcvtzs z7.d, p0/m, z0.s
740 ; CHECK-NEXT: fcmge p3.s, p0/z, z3.s, z4.s
741 ; CHECK-NEXT: fcmge p4.s, p0/z, z1.s, z4.s
742 ; CHECK-NEXT: movprfx z4, z2
743 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z2.s
744 ; CHECK-NEXT: movprfx z24, z3
745 ; CHECK-NEXT: fcvtzs z24.d, p0/m, z3.s
746 ; CHECK-NEXT: movprfx z25, z1
747 ; CHECK-NEXT: fcvtzs z25.d, p0/m, z1.s
748 ; CHECK-NEXT: fcmgt p7.s, p0/z, z3.s, z6.s
749 ; CHECK-NEXT: fcmgt p5.s, p0/z, z2.s, z6.s
750 ; CHECK-NEXT: fcmgt p6.s, p0/z, z0.s, z6.s
751 ; CHECK-NEXT: not p1.b, p0/z, p1.b
752 ; CHECK-NEXT: not p2.b, p0/z, p2.b
753 ; CHECK-NEXT: not p3.b, p0/z, p3.b
754 ; CHECK-NEXT: mov z4.d, p1/m, z5.d
755 ; CHECK-NEXT: fcmgt p1.s, p0/z, z1.s, z6.s
756 ; CHECK-NEXT: not p4.b, p0/z, p4.b
757 ; CHECK-NEXT: sel z6.d, p2, z5.d, z7.d
758 ; CHECK-NEXT: fcmuo p2.s, p0/z, z2.s, z2.s
759 ; CHECK-NEXT: sel z7.d, p3, z5.d, z24.d
760 ; CHECK-NEXT: fcmuo p3.s, p0/z, z0.s, z0.s
761 ; CHECK-NEXT: sel z5.d, p4, z5.d, z25.d
762 ; CHECK-NEXT: fcmuo p4.s, p0/z, z3.s, z3.s
763 ; CHECK-NEXT: fcmuo p0.s, p0/z, z1.s, z1.s
764 ; CHECK-NEXT: sel z0.d, p5, z26.d, z4.d
765 ; CHECK-NEXT: sel z1.d, p6, z26.d, z6.d
766 ; CHECK-NEXT: ldr p6, [sp, #5, mul vl] // 2-byte Folded Reload
767 ; CHECK-NEXT: sel z2.d, p7, z26.d, z7.d
768 ; CHECK-NEXT: ldr p7, [sp, #4, mul vl] // 2-byte Folded Reload
769 ; CHECK-NEXT: sel z3.d, p1, z26.d, z5.d
770 ; CHECK-NEXT: ldr p5, [sp, #6, mul vl] // 2-byte Folded Reload
771 ; CHECK-NEXT: mov z0.d, p2/m, #0 // =0x0
772 ; CHECK-NEXT: mov z1.d, p3/m, #0 // =0x0
773 ; CHECK-NEXT: mov z2.d, p4/m, #0 // =0x0
774 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
775 ; CHECK-NEXT: mov z3.d, p0/m, #0 // =0x0
776 ; CHECK-NEXT: addvl sp, sp, #1
777 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
779 %a = call <vscale x 8 x iXLen> @llvm.lrint.nxv8iXLen.nxv8f32(<vscale x 8 x float> %x)
780 ret <vscale x 8 x iXLen> %a
782 declare <vscale x 8 x iXLen> @llvm.lrint.nxv8iXLen.nxv8f32(<vscale x 8 x float>)
784 define <vscale x 16 x iXLen> @lrint_v16f32(<vscale x 16 x float> %x) {
785 ; CHECK-LABEL: lrint_v16f32:
787 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
788 ; CHECK-NEXT: addvl sp, sp, #-2
789 ; CHECK-NEXT: str p10, [sp, #1, mul vl] // 2-byte Folded Spill
790 ; CHECK-NEXT: str p9, [sp, #2, mul vl] // 2-byte Folded Spill
791 ; CHECK-NEXT: str p8, [sp, #3, mul vl] // 2-byte Folded Spill
792 ; CHECK-NEXT: str p7, [sp, #4, mul vl] // 2-byte Folded Spill
793 ; CHECK-NEXT: str p6, [sp, #5, mul vl] // 2-byte Folded Spill
794 ; CHECK-NEXT: str p5, [sp, #6, mul vl] // 2-byte Folded Spill
795 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
796 ; CHECK-NEXT: str z8, [sp, #1, mul vl] // 16-byte Folded Spill
797 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 16 * VG
798 ; CHECK-NEXT: .cfi_offset w29, -16
799 ; CHECK-NEXT: .cfi_escape 0x10, 0x48, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x78, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d8 @ cfa - 16 - 8 * VG
800 ; CHECK-NEXT: uunpklo z4.d, z0.s
801 ; CHECK-NEXT: uunpkhi z0.d, z0.s
802 ; CHECK-NEXT: mov w8, #-553648128 // =0xdf000000
803 ; CHECK-NEXT: ptrue p0.d
804 ; CHECK-NEXT: uunpklo z7.d, z1.s
805 ; CHECK-NEXT: uunpkhi z1.d, z1.s
806 ; CHECK-NEXT: uunpklo z24.d, z2.s
807 ; CHECK-NEXT: uunpkhi z2.d, z2.s
808 ; CHECK-NEXT: uunpklo z25.d, z3.s
809 ; CHECK-NEXT: uunpkhi z3.d, z3.s
810 ; CHECK-NEXT: mov z26.d, #0x7fffffffffffffff
811 ; CHECK-NEXT: movprfx z5, z4
812 ; CHECK-NEXT: frintx z5.s, p0/m, z4.s
813 ; CHECK-NEXT: movprfx z6, z0
814 ; CHECK-NEXT: frintx z6.s, p0/m, z0.s
815 ; CHECK-NEXT: mov z4.s, w8
816 ; CHECK-NEXT: frintx z7.s, p0/m, z7.s
817 ; CHECK-NEXT: movprfx z28, z1
818 ; CHECK-NEXT: frintx z28.s, p0/m, z1.s
819 ; CHECK-NEXT: mov w8, #1593835519 // =0x5effffff
820 ; CHECK-NEXT: mov z0.d, #0x8000000000000000
821 ; CHECK-NEXT: frintx z24.s, p0/m, z24.s
822 ; CHECK-NEXT: movprfx z29, z2
823 ; CHECK-NEXT: frintx z29.s, p0/m, z2.s
824 ; CHECK-NEXT: frintx z25.s, p0/m, z25.s
825 ; CHECK-NEXT: movprfx z30, z3
826 ; CHECK-NEXT: frintx z30.s, p0/m, z3.s
827 ; CHECK-NEXT: mov z27.s, w8
828 ; CHECK-NEXT: fcmge p1.s, p0/z, z5.s, z4.s
829 ; CHECK-NEXT: fcmge p2.s, p0/z, z6.s, z4.s
830 ; CHECK-NEXT: movprfx z1, z5
831 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z5.s
832 ; CHECK-NEXT: movprfx z2, z6
833 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z6.s
834 ; CHECK-NEXT: fcmge p5.s, p0/z, z7.s, z4.s
835 ; CHECK-NEXT: fcmge p6.s, p0/z, z28.s, z4.s
836 ; CHECK-NEXT: movprfx z3, z7
837 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z7.s
838 ; CHECK-NEXT: fcmge p8.s, p0/z, z29.s, z4.s
839 ; CHECK-NEXT: fcmgt p3.s, p0/z, z5.s, z27.s
840 ; CHECK-NEXT: fcmgt p7.s, p0/z, z6.s, z27.s
841 ; CHECK-NEXT: fcmge p9.s, p0/z, z25.s, z4.s
842 ; CHECK-NEXT: movprfx z31, z25
843 ; CHECK-NEXT: fcvtzs z31.d, p0/m, z25.s
844 ; CHECK-NEXT: not p4.b, p0/z, p1.b
845 ; CHECK-NEXT: fcmuo p1.s, p0/z, z5.s, z5.s
846 ; CHECK-NEXT: movprfx z5, z28
847 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z28.s
848 ; CHECK-NEXT: not p2.b, p0/z, p2.b
849 ; CHECK-NEXT: fcmge p10.s, p0/z, z30.s, z4.s
850 ; CHECK-NEXT: movprfx z8, z30
851 ; CHECK-NEXT: fcvtzs z8.d, p0/m, z30.s
852 ; CHECK-NEXT: mov z1.d, p4/m, z0.d
853 ; CHECK-NEXT: fcmge p4.s, p0/z, z24.s, z4.s
854 ; CHECK-NEXT: movprfx z4, z29
855 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z29.s
856 ; CHECK-NEXT: mov z2.d, p2/m, z0.d
857 ; CHECK-NEXT: fcmuo p2.s, p0/z, z6.s, z6.s
858 ; CHECK-NEXT: movprfx z6, z24
859 ; CHECK-NEXT: fcvtzs z6.d, p0/m, z24.s
860 ; CHECK-NEXT: not p5.b, p0/z, p5.b
861 ; CHECK-NEXT: not p6.b, p0/z, p6.b
862 ; CHECK-NEXT: not p4.b, p0/z, p4.b
863 ; CHECK-NEXT: mov z3.d, p5/m, z0.d
864 ; CHECK-NEXT: not p5.b, p0/z, p8.b
865 ; CHECK-NEXT: mov z5.d, p6/m, z0.d
866 ; CHECK-NEXT: fcmgt p8.s, p0/z, z7.s, z27.s
867 ; CHECK-NEXT: not p6.b, p0/z, p9.b
868 ; CHECK-NEXT: mov z6.d, p4/m, z0.d
869 ; CHECK-NEXT: fcmuo p9.s, p0/z, z7.s, z7.s
870 ; CHECK-NEXT: not p4.b, p0/z, p10.b
871 ; CHECK-NEXT: fcmgt p10.s, p0/z, z28.s, z27.s
872 ; CHECK-NEXT: sel z7.d, p5, z0.d, z4.d
873 ; CHECK-NEXT: fcmgt p5.s, p0/z, z24.s, z27.s
874 ; CHECK-NEXT: mov z31.d, p6/m, z0.d
875 ; CHECK-NEXT: fcmgt p6.s, p0/z, z30.s, z27.s
876 ; CHECK-NEXT: mov z8.d, p4/m, z0.d
877 ; CHECK-NEXT: sel z0.d, p3, z26.d, z1.d
878 ; CHECK-NEXT: fcmgt p3.s, p0/z, z29.s, z27.s
879 ; CHECK-NEXT: fcmgt p4.s, p0/z, z25.s, z27.s
880 ; CHECK-NEXT: sel z1.d, p7, z26.d, z2.d
881 ; CHECK-NEXT: fcmuo p7.s, p0/z, z28.s, z28.s
882 ; CHECK-NEXT: sel z2.d, p8, z26.d, z3.d
883 ; CHECK-NEXT: sel z3.d, p10, z26.d, z5.d
884 ; CHECK-NEXT: fcmuo p8.s, p0/z, z29.s, z29.s
885 ; CHECK-NEXT: sel z4.d, p5, z26.d, z6.d
886 ; CHECK-NEXT: fcmuo p5.s, p0/z, z24.s, z24.s
887 ; CHECK-NEXT: fcmuo p10.s, p0/z, z25.s, z25.s
888 ; CHECK-NEXT: sel z5.d, p3, z26.d, z7.d
889 ; CHECK-NEXT: fcmuo p0.s, p0/z, z30.s, z30.s
890 ; CHECK-NEXT: sel z7.d, p6, z26.d, z8.d
891 ; CHECK-NEXT: ldr z8, [sp, #1, mul vl] // 16-byte Folded Reload
892 ; CHECK-NEXT: ldr p6, [sp, #5, mul vl] // 2-byte Folded Reload
893 ; CHECK-NEXT: sel z6.d, p4, z26.d, z31.d
894 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
895 ; CHECK-NEXT: mov z2.d, p9/m, #0 // =0x0
896 ; CHECK-NEXT: mov z3.d, p7/m, #0 // =0x0
897 ; CHECK-NEXT: ldr p9, [sp, #2, mul vl] // 2-byte Folded Reload
898 ; CHECK-NEXT: mov z4.d, p5/m, #0 // =0x0
899 ; CHECK-NEXT: mov z5.d, p8/m, #0 // =0x0
900 ; CHECK-NEXT: ldr p8, [sp, #3, mul vl] // 2-byte Folded Reload
901 ; CHECK-NEXT: mov z6.d, p10/m, #0 // =0x0
902 ; CHECK-NEXT: mov z0.d, p1/m, #0 // =0x0
903 ; CHECK-NEXT: ldr p10, [sp, #1, mul vl] // 2-byte Folded Reload
904 ; CHECK-NEXT: mov z1.d, p2/m, #0 // =0x0
905 ; CHECK-NEXT: mov z7.d, p0/m, #0 // =0x0
906 ; CHECK-NEXT: ldr p7, [sp, #4, mul vl] // 2-byte Folded Reload
907 ; CHECK-NEXT: ldr p5, [sp, #6, mul vl] // 2-byte Folded Reload
908 ; CHECK-NEXT: addvl sp, sp, #2
909 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
911 %a = call <vscale x 16 x iXLen> @llvm.lrint.nxv16iXLen.nxv16f32(<vscale x 16 x float> %x)
912 ret <vscale x 16 x iXLen> %a
914 declare <vscale x 16 x iXLen> @llvm.lrint.nxv16iXLen.nxv16f32(<vscale x 16 x float>)
916 define <vscale x 32 x iXLen> @lrint_v32f32(<vscale x 32 x float> %x) {
917 ; CHECK-LABEL: lrint_v32f32:
919 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
920 ; CHECK-NEXT: addvl sp, sp, #-17
921 ; CHECK-NEXT: str p9, [sp, #2, mul vl] // 2-byte Folded Spill
922 ; CHECK-NEXT: str p8, [sp, #3, mul vl] // 2-byte Folded Spill
923 ; CHECK-NEXT: str p7, [sp, #4, mul vl] // 2-byte Folded Spill
924 ; CHECK-NEXT: str p6, [sp, #5, mul vl] // 2-byte Folded Spill
925 ; CHECK-NEXT: str p5, [sp, #6, mul vl] // 2-byte Folded Spill
926 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
927 ; CHECK-NEXT: str z23, [sp, #1, mul vl] // 16-byte Folded Spill
928 ; CHECK-NEXT: str z22, [sp, #2, mul vl] // 16-byte Folded Spill
929 ; CHECK-NEXT: str z21, [sp, #3, mul vl] // 16-byte Folded Spill
930 ; CHECK-NEXT: str z20, [sp, #4, mul vl] // 16-byte Folded Spill
931 ; CHECK-NEXT: str z19, [sp, #5, mul vl] // 16-byte Folded Spill
932 ; CHECK-NEXT: str z18, [sp, #6, mul vl] // 16-byte Folded Spill
933 ; CHECK-NEXT: str z17, [sp, #7, mul vl] // 16-byte Folded Spill
934 ; CHECK-NEXT: str z16, [sp, #8, mul vl] // 16-byte Folded Spill
935 ; CHECK-NEXT: str z15, [sp, #9, mul vl] // 16-byte Folded Spill
936 ; CHECK-NEXT: str z14, [sp, #10, mul vl] // 16-byte Folded Spill
937 ; CHECK-NEXT: str z13, [sp, #11, mul vl] // 16-byte Folded Spill
938 ; CHECK-NEXT: str z12, [sp, #12, mul vl] // 16-byte Folded Spill
939 ; CHECK-NEXT: str z11, [sp, #13, mul vl] // 16-byte Folded Spill
940 ; CHECK-NEXT: str z10, [sp, #14, mul vl] // 16-byte Folded Spill
941 ; CHECK-NEXT: str z9, [sp, #15, mul vl] // 16-byte Folded Spill
942 ; CHECK-NEXT: str z8, [sp, #16, mul vl] // 16-byte Folded Spill
943 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x88, 0x01, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 136 * VG
944 ; CHECK-NEXT: .cfi_offset w29, -16
945 ; CHECK-NEXT: .cfi_escape 0x10, 0x48, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x78, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d8 @ cfa - 16 - 8 * VG
946 ; CHECK-NEXT: .cfi_escape 0x10, 0x49, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x70, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d9 @ cfa - 16 - 16 * VG
947 ; CHECK-NEXT: .cfi_escape 0x10, 0x4a, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x68, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d10 @ cfa - 16 - 24 * VG
948 ; CHECK-NEXT: .cfi_escape 0x10, 0x4b, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x60, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d11 @ cfa - 16 - 32 * VG
949 ; CHECK-NEXT: .cfi_escape 0x10, 0x4c, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x58, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d12 @ cfa - 16 - 40 * VG
950 ; CHECK-NEXT: .cfi_escape 0x10, 0x4d, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x50, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d13 @ cfa - 16 - 48 * VG
951 ; CHECK-NEXT: .cfi_escape 0x10, 0x4e, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x48, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d14 @ cfa - 16 - 56 * VG
952 ; CHECK-NEXT: .cfi_escape 0x10, 0x4f, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x40, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d15 @ cfa - 16 - 64 * VG
953 ; CHECK-NEXT: uunpklo z24.d, z0.s
954 ; CHECK-NEXT: uunpkhi z25.d, z0.s
955 ; CHECK-NEXT: mov w9, #-553648128 // =0xdf000000
956 ; CHECK-NEXT: uunpklo z26.d, z1.s
957 ; CHECK-NEXT: ptrue p0.d
958 ; CHECK-NEXT: uunpkhi z27.d, z1.s
959 ; CHECK-NEXT: mov z31.s, w9
960 ; CHECK-NEXT: mov w9, #1593835519 // =0x5effffff
961 ; CHECK-NEXT: uunpklo z28.d, z2.s
962 ; CHECK-NEXT: mov z8.d, #0x8000000000000000
963 ; CHECK-NEXT: uunpklo z30.d, z3.s
964 ; CHECK-NEXT: uunpklo z13.d, z4.s
965 ; CHECK-NEXT: movprfx z0, z24
966 ; CHECK-NEXT: frintx z0.s, p0/m, z24.s
967 ; CHECK-NEXT: movprfx z1, z25
968 ; CHECK-NEXT: frintx z1.s, p0/m, z25.s
969 ; CHECK-NEXT: uunpkhi z15.d, z4.s
970 ; CHECK-NEXT: movprfx z24, z26
971 ; CHECK-NEXT: frintx z24.s, p0/m, z26.s
972 ; CHECK-NEXT: uunpkhi z26.d, z2.s
973 ; CHECK-NEXT: movprfx z25, z27
974 ; CHECK-NEXT: frintx z25.s, p0/m, z27.s
975 ; CHECK-NEXT: movprfx z27, z28
976 ; CHECK-NEXT: frintx z27.s, p0/m, z28.s
977 ; CHECK-NEXT: uunpklo z16.d, z5.s
978 ; CHECK-NEXT: uunpkhi z17.d, z7.s
979 ; CHECK-NEXT: frintx z30.s, p0/m, z30.s
980 ; CHECK-NEXT: uunpklo z18.d, z7.s
981 ; CHECK-NEXT: uunpklo z21.d, z6.s
982 ; CHECK-NEXT: fcmge p1.s, p0/z, z0.s, z31.s
983 ; CHECK-NEXT: movprfx z9, z0
984 ; CHECK-NEXT: fcvtzs z9.d, p0/m, z0.s
985 ; CHECK-NEXT: movprfx z10, z1
986 ; CHECK-NEXT: fcvtzs z10.d, p0/m, z1.s
987 ; CHECK-NEXT: fcmge p2.s, p0/z, z1.s, z31.s
988 ; CHECK-NEXT: fcmge p3.s, p0/z, z24.s, z31.s
989 ; CHECK-NEXT: movprfx z11, z24
990 ; CHECK-NEXT: fcvtzs z11.d, p0/m, z24.s
991 ; CHECK-NEXT: movprfx z29, z26
992 ; CHECK-NEXT: frintx z29.s, p0/m, z26.s
993 ; CHECK-NEXT: fcmge p4.s, p0/z, z25.s, z31.s
994 ; CHECK-NEXT: fcmge p5.s, p0/z, z27.s, z31.s
995 ; CHECK-NEXT: movprfx z12, z27
996 ; CHECK-NEXT: fcvtzs z12.d, p0/m, z27.s
997 ; CHECK-NEXT: movprfx z19, z30
998 ; CHECK-NEXT: fcvtzs z19.d, p0/m, z30.s
999 ; CHECK-NEXT: movprfx z7, z16
1000 ; CHECK-NEXT: frintx z7.s, p0/m, z16.s
1001 ; CHECK-NEXT: not p1.b, p0/z, p1.b
1002 ; CHECK-NEXT: frintx z17.s, p0/m, z17.s
1003 ; CHECK-NEXT: uunpkhi z16.d, z5.s
1004 ; CHECK-NEXT: not p2.b, p0/z, p2.b
1005 ; CHECK-NEXT: frintx z18.s, p0/m, z18.s
1006 ; CHECK-NEXT: mov z28.s, w9
1007 ; CHECK-NEXT: not p6.b, p0/z, p3.b
1008 ; CHECK-NEXT: sel z26.d, p1, z8.d, z9.d
1009 ; CHECK-NEXT: movprfx z14, z29
1010 ; CHECK-NEXT: fcvtzs z14.d, p0/m, z29.s
1011 ; CHECK-NEXT: sel z9.d, p2, z8.d, z10.d
1012 ; CHECK-NEXT: uunpkhi z10.d, z3.s
1013 ; CHECK-NEXT: rdvl x9, #15
1014 ; CHECK-NEXT: sel z3.d, p6, z8.d, z11.d
1015 ; CHECK-NEXT: movprfx z11, z25
1016 ; CHECK-NEXT: fcvtzs z11.d, p0/m, z25.s
1017 ; CHECK-NEXT: fcmge p3.s, p0/z, z29.s, z31.s
1018 ; CHECK-NEXT: not p4.b, p0/z, p4.b
1019 ; CHECK-NEXT: fcmge p1.s, p0/z, z30.s, z31.s
1020 ; CHECK-NEXT: movprfx z23, z18
1021 ; CHECK-NEXT: fcvtzs z23.d, p0/m, z18.s
1022 ; CHECK-NEXT: not p2.b, p0/z, p5.b
1023 ; CHECK-NEXT: fcmge p5.s, p0/z, z17.s, z31.s
1024 ; CHECK-NEXT: frintx z16.s, p0/m, z16.s
1025 ; CHECK-NEXT: frintx z10.s, p0/m, z10.s
1026 ; CHECK-NEXT: mov z2.d, #0x7fffffffffffffff
1027 ; CHECK-NEXT: fcmgt p8.s, p0/z, z18.s, z28.s
1028 ; CHECK-NEXT: sel z4.d, p4, z8.d, z11.d
1029 ; CHECK-NEXT: movprfx z11, z13
1030 ; CHECK-NEXT: frintx z11.s, p0/m, z13.s
1031 ; CHECK-NEXT: not p3.b, p0/z, p3.b
1032 ; CHECK-NEXT: sel z13.d, p2, z8.d, z12.d
1033 ; CHECK-NEXT: not p1.b, p0/z, p1.b
1034 ; CHECK-NEXT: fcmge p4.s, p0/z, z7.s, z31.s
1035 ; CHECK-NEXT: sel z12.d, p3, z8.d, z14.d
1036 ; CHECK-NEXT: movprfx z14, z15
1037 ; CHECK-NEXT: frintx z14.s, p0/m, z15.s
1038 ; CHECK-NEXT: uunpkhi z15.d, z6.s
1039 ; CHECK-NEXT: movprfx z20, z10
1040 ; CHECK-NEXT: fcvtzs z20.d, p0/m, z10.s
1041 ; CHECK-NEXT: fcmge p2.s, p0/z, z10.s, z31.s
1042 ; CHECK-NEXT: sel z5.d, p1, z8.d, z19.d
1043 ; CHECK-NEXT: movprfx z19, z11
1044 ; CHECK-NEXT: fcvtzs z19.d, p0/m, z11.s
1045 ; CHECK-NEXT: fcmge p3.s, p0/z, z11.s, z31.s
1046 ; CHECK-NEXT: not p5.b, p0/z, p5.b
1047 ; CHECK-NEXT: fcmge p6.s, p0/z, z16.s, z31.s
1048 ; CHECK-NEXT: fcmuo p9.s, p0/z, z18.s, z18.s
1049 ; CHECK-NEXT: movprfx z22, z15
1050 ; CHECK-NEXT: frintx z22.s, p0/m, z15.s
1051 ; CHECK-NEXT: fcmge p1.s, p0/z, z14.s, z31.s
1052 ; CHECK-NEXT: not p2.b, p0/z, p2.b
1053 ; CHECK-NEXT: not p3.b, p0/z, p3.b
1054 ; CHECK-NEXT: sel z6.d, p2, z8.d, z20.d
1055 ; CHECK-NEXT: movprfx z20, z21
1056 ; CHECK-NEXT: frintx z20.s, p0/m, z21.s
1057 ; CHECK-NEXT: fcmge p2.s, p0/z, z18.s, z31.s
1058 ; CHECK-NEXT: sel z15.d, p3, z8.d, z19.d
1059 ; CHECK-NEXT: movprfx z19, z17
1060 ; CHECK-NEXT: fcvtzs z19.d, p0/m, z17.s
1061 ; CHECK-NEXT: not p3.b, p0/z, p4.b
1062 ; CHECK-NEXT: fcmge p4.s, p0/z, z22.s, z31.s
1063 ; CHECK-NEXT: movprfx z21, z14
1064 ; CHECK-NEXT: fcvtzs z21.d, p0/m, z14.s
1065 ; CHECK-NEXT: not p1.b, p0/z, p1.b
1066 ; CHECK-NEXT: movprfx z18, z7
1067 ; CHECK-NEXT: fcvtzs z18.d, p0/m, z7.s
1068 ; CHECK-NEXT: not p6.b, p0/z, p6.b
1069 ; CHECK-NEXT: fcmge p7.s, p0/z, z20.s, z31.s
1070 ; CHECK-NEXT: movprfx z31, z22
1071 ; CHECK-NEXT: fcvtzs z31.d, p0/m, z22.s
1072 ; CHECK-NEXT: not p2.b, p0/z, p2.b
1073 ; CHECK-NEXT: mov z19.d, p5/m, z8.d
1074 ; CHECK-NEXT: fcmgt p5.s, p0/z, z17.s, z28.s
1075 ; CHECK-NEXT: not p4.b, p0/z, p4.b
1076 ; CHECK-NEXT: mov z23.d, p2/m, z8.d
1077 ; CHECK-NEXT: fcmuo p2.s, p0/z, z17.s, z17.s
1078 ; CHECK-NEXT: movprfx z17, z20
1079 ; CHECK-NEXT: fcvtzs z17.d, p0/m, z20.s
1080 ; CHECK-NEXT: mov z21.d, p1/m, z8.d
1081 ; CHECK-NEXT: mov z18.d, p3/m, z8.d
1082 ; CHECK-NEXT: not p1.b, p0/z, p7.b
1083 ; CHECK-NEXT: mov z31.d, p4/m, z8.d
1084 ; CHECK-NEXT: fcmgt p4.s, p0/z, z20.s, z28.s
1085 ; CHECK-NEXT: mov z19.d, p5/m, z2.d
1086 ; CHECK-NEXT: fcmuo p7.s, p0/z, z20.s, z20.s
1087 ; CHECK-NEXT: movprfx z20, z16
1088 ; CHECK-NEXT: fcvtzs z20.d, p0/m, z16.s
1089 ; CHECK-NEXT: fcmgt p5.s, p0/z, z22.s, z28.s
1090 ; CHECK-NEXT: mov z23.d, p8/m, z2.d
1091 ; CHECK-NEXT: fcmuo p3.s, p0/z, z22.s, z22.s
1092 ; CHECK-NEXT: mov z17.d, p1/m, z8.d
1093 ; CHECK-NEXT: ptrue p1.b
1094 ; CHECK-NEXT: mov z19.d, p2/m, #0 // =0x0
1095 ; CHECK-NEXT: fcmgt p2.s, p0/z, z16.s, z28.s
1096 ; CHECK-NEXT: sel z8.d, p6, z8.d, z20.d
1097 ; CHECK-NEXT: mov z23.d, p9/m, #0 // =0x0
1098 ; CHECK-NEXT: fcmgt p6.s, p0/z, z14.s, z28.s
1099 ; CHECK-NEXT: mov z31.d, p5/m, z2.d
1100 ; CHECK-NEXT: mov z17.d, p4/m, z2.d
1101 ; CHECK-NEXT: fcmuo p4.s, p0/z, z16.s, z16.s
1102 ; CHECK-NEXT: st1b { z19.b }, p1, [x8, x9]
1103 ; CHECK-NEXT: rdvl x9, #14
1104 ; CHECK-NEXT: fcmgt p5.s, p0/z, z1.s, z28.s
1105 ; CHECK-NEXT: st1b { z23.b }, p1, [x8, x9]
1106 ; CHECK-NEXT: rdvl x9, #13
1107 ; CHECK-NEXT: mov z8.d, p2/m, z2.d
1108 ; CHECK-NEXT: mov z31.d, p3/m, #0 // =0x0
1109 ; CHECK-NEXT: fcmgt p3.s, p0/z, z7.s, z28.s
1110 ; CHECK-NEXT: mov z17.d, p7/m, #0 // =0x0
1111 ; CHECK-NEXT: fcmgt p2.s, p0/z, z11.s, z28.s
1112 ; CHECK-NEXT: fcmuo p7.s, p0/z, z14.s, z14.s
1113 ; CHECK-NEXT: mov z8.d, p4/m, #0 // =0x0
1114 ; CHECK-NEXT: fcmuo p4.s, p0/z, z7.s, z7.s
1115 ; CHECK-NEXT: sel z7.d, p5, z2.d, z9.d
1116 ; CHECK-NEXT: st1b { z31.b }, p1, [x8, x9]
1117 ; CHECK-NEXT: rdvl x9, #12
1118 ; CHECK-NEXT: fcmgt p5.s, p0/z, z27.s, z28.s
1119 ; CHECK-NEXT: st1b { z17.b }, p1, [x8, x9]
1120 ; CHECK-NEXT: rdvl x9, #11
1121 ; CHECK-NEXT: sel z31.d, p3, z2.d, z18.d
1122 ; CHECK-NEXT: st1b { z8.b }, p1, [x8, x9]
1123 ; CHECK-NEXT: rdvl x9, #10
1124 ; CHECK-NEXT: fcmgt p3.s, p0/z, z30.s, z28.s
1125 ; CHECK-NEXT: sel z9.d, p2, z2.d, z15.d
1126 ; CHECK-NEXT: fcmuo p2.s, p0/z, z11.s, z11.s
1127 ; CHECK-NEXT: sel z8.d, p6, z2.d, z21.d
1128 ; CHECK-NEXT: mov z31.d, p4/m, #0 // =0x0
1129 ; CHECK-NEXT: fcmgt p4.s, p0/z, z10.s, z28.s
1130 ; CHECK-NEXT: fcmgt p6.s, p0/z, z24.s, z28.s
1131 ; CHECK-NEXT: sel z11.d, p5, z2.d, z13.d
1132 ; CHECK-NEXT: fcmgt p5.s, p0/z, z25.s, z28.s
1133 ; CHECK-NEXT: mov z8.d, p7/m, #0 // =0x0
1134 ; CHECK-NEXT: mov z5.d, p3/m, z2.d
1135 ; CHECK-NEXT: fcmgt p3.s, p0/z, z29.s, z28.s
1136 ; CHECK-NEXT: st1b { z31.b }, p1, [x8, x9]
1137 ; CHECK-NEXT: rdvl x9, #9
1138 ; CHECK-NEXT: mov z9.d, p2/m, #0 // =0x0
1139 ; CHECK-NEXT: fcmuo p7.s, p0/z, z10.s, z10.s
1140 ; CHECK-NEXT: fcmuo p2.s, p0/z, z30.s, z30.s
1141 ; CHECK-NEXT: mov z6.d, p4/m, z2.d
1142 ; CHECK-NEXT: st1b { z8.b }, p1, [x8, x9]
1143 ; CHECK-NEXT: rdvl x9, #8
1144 ; CHECK-NEXT: fcmuo p4.s, p0/z, z29.s, z29.s
1145 ; CHECK-NEXT: st1b { z9.b }, p1, [x8, x9]
1146 ; CHECK-NEXT: fcmuo p1.s, p0/z, z27.s, z27.s
1147 ; CHECK-NEXT: sel z27.d, p3, z2.d, z12.d
1148 ; CHECK-NEXT: fcmgt p3.s, p0/z, z0.s, z28.s
1149 ; CHECK-NEXT: mov z4.d, p5/m, z2.d
1150 ; CHECK-NEXT: mov z3.d, p6/m, z2.d
1151 ; CHECK-NEXT: mov z6.d, p7/m, #0 // =0x0
1152 ; CHECK-NEXT: fcmuo p7.s, p0/z, z25.s, z25.s
1153 ; CHECK-NEXT: mov z5.d, p2/m, #0 // =0x0
1154 ; CHECK-NEXT: fcmuo p2.s, p0/z, z24.s, z24.s
1155 ; CHECK-NEXT: mov z27.d, p4/m, #0 // =0x0
1156 ; CHECK-NEXT: fcmuo p4.s, p0/z, z1.s, z1.s
1157 ; CHECK-NEXT: mov z11.d, p1/m, #0 // =0x0
1158 ; CHECK-NEXT: fcmuo p1.s, p0/z, z0.s, z0.s
1159 ; CHECK-NEXT: st1d { z6.d }, p0, [x8, #7, mul vl]
1160 ; CHECK-NEXT: sel z0.d, p3, z2.d, z26.d
1161 ; CHECK-NEXT: st1d { z5.d }, p0, [x8, #6, mul vl]
1162 ; CHECK-NEXT: mov z4.d, p7/m, #0 // =0x0
1163 ; CHECK-NEXT: st1d { z27.d }, p0, [x8, #5, mul vl]
1164 ; CHECK-NEXT: mov z3.d, p2/m, #0 // =0x0
1165 ; CHECK-NEXT: mov z7.d, p4/m, #0 // =0x0
1166 ; CHECK-NEXT: st1d { z11.d }, p0, [x8, #4, mul vl]
1167 ; CHECK-NEXT: mov z0.d, p1/m, #0 // =0x0
1168 ; CHECK-NEXT: st1d { z4.d }, p0, [x8, #3, mul vl]
1169 ; CHECK-NEXT: st1d { z3.d }, p0, [x8, #2, mul vl]
1170 ; CHECK-NEXT: st1d { z7.d }, p0, [x8, #1, mul vl]
1171 ; CHECK-NEXT: st1d { z0.d }, p0, [x8]
1172 ; CHECK-NEXT: ldr z23, [sp, #1, mul vl] // 16-byte Folded Reload
1173 ; CHECK-NEXT: ldr z22, [sp, #2, mul vl] // 16-byte Folded Reload
1174 ; CHECK-NEXT: ldr z21, [sp, #3, mul vl] // 16-byte Folded Reload
1175 ; CHECK-NEXT: ldr z20, [sp, #4, mul vl] // 16-byte Folded Reload
1176 ; CHECK-NEXT: ldr z19, [sp, #5, mul vl] // 16-byte Folded Reload
1177 ; CHECK-NEXT: ldr z18, [sp, #6, mul vl] // 16-byte Folded Reload
1178 ; CHECK-NEXT: ldr z17, [sp, #7, mul vl] // 16-byte Folded Reload
1179 ; CHECK-NEXT: ldr z16, [sp, #8, mul vl] // 16-byte Folded Reload
1180 ; CHECK-NEXT: ldr z15, [sp, #9, mul vl] // 16-byte Folded Reload
1181 ; CHECK-NEXT: ldr z14, [sp, #10, mul vl] // 16-byte Folded Reload
1182 ; CHECK-NEXT: ldr z13, [sp, #11, mul vl] // 16-byte Folded Reload
1183 ; CHECK-NEXT: ldr z12, [sp, #12, mul vl] // 16-byte Folded Reload
1184 ; CHECK-NEXT: ldr z11, [sp, #13, mul vl] // 16-byte Folded Reload
1185 ; CHECK-NEXT: ldr z10, [sp, #14, mul vl] // 16-byte Folded Reload
1186 ; CHECK-NEXT: ldr z9, [sp, #15, mul vl] // 16-byte Folded Reload
1187 ; CHECK-NEXT: ldr z8, [sp, #16, mul vl] // 16-byte Folded Reload
1188 ; CHECK-NEXT: ldr p9, [sp, #2, mul vl] // 2-byte Folded Reload
1189 ; CHECK-NEXT: ldr p8, [sp, #3, mul vl] // 2-byte Folded Reload
1190 ; CHECK-NEXT: ldr p7, [sp, #4, mul vl] // 2-byte Folded Reload
1191 ; CHECK-NEXT: ldr p6, [sp, #5, mul vl] // 2-byte Folded Reload
1192 ; CHECK-NEXT: ldr p5, [sp, #6, mul vl] // 2-byte Folded Reload
1193 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
1194 ; CHECK-NEXT: addvl sp, sp, #17
1195 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
1197 %a = call <vscale x 32 x iXLen> @llvm.lrint.nxv32iXLen.nxv32f32(<vscale x 32 x float> %x)
1198 ret <vscale x 32 x iXLen> %a
1200 declare <vscale x 32 x iXLen> @llvm.lrint.nxv32iXLen.nxv32f32(<vscale x 32 x float>)
1202 define <vscale x 1 x iXLen> @lrint_v1f64(<vscale x 1 x double> %x) {
1203 ; CHECK-LABEL: lrint_v1f64:
1205 ; CHECK-NEXT: ptrue p0.d
1206 ; CHECK-NEXT: mov x8, #-4332462841530417152 // =0xc3e0000000000000
1207 ; CHECK-NEXT: mov z2.d, #0x8000000000000000
1208 ; CHECK-NEXT: mov z1.d, x8
1209 ; CHECK-NEXT: mov x8, #4890909195324358655 // =0x43dfffffffffffff
1210 ; CHECK-NEXT: frintx z0.d, p0/m, z0.d
1211 ; CHECK-NEXT: mov z3.d, x8
1212 ; CHECK-NEXT: fcmge p1.d, p0/z, z0.d, z1.d
1213 ; CHECK-NEXT: movprfx z1, z0
1214 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z0.d
1215 ; CHECK-NEXT: fcmgt p2.d, p0/z, z0.d, z3.d
1216 ; CHECK-NEXT: mov z3.d, #0x7fffffffffffffff
1217 ; CHECK-NEXT: not p1.b, p0/z, p1.b
1218 ; CHECK-NEXT: fcmuo p0.d, p0/z, z0.d, z0.d
1219 ; CHECK-NEXT: mov z1.d, p1/m, z2.d
1220 ; CHECK-NEXT: sel z0.d, p2, z3.d, z1.d
1221 ; CHECK-NEXT: mov z0.d, p0/m, #0 // =0x0
1223 %a = call <vscale x 1 x iXLen> @llvm.lrint.nxv1iXLen.nxv1f64(<vscale x 1 x double> %x)
1224 ret <vscale x 1 x iXLen> %a
1226 declare <vscale x 1 x iXLen> @llvm.lrint.nxv1iXLen.nxv1f64(<vscale x 1 x double>)
1228 define <vscale x 2 x iXLen> @lrint_v2f64(<vscale x 2 x double> %x) {
1229 ; CHECK-LABEL: lrint_v2f64:
1231 ; CHECK-NEXT: ptrue p0.d
1232 ; CHECK-NEXT: mov x8, #-4332462841530417152 // =0xc3e0000000000000
1233 ; CHECK-NEXT: mov z2.d, #0x8000000000000000
1234 ; CHECK-NEXT: mov z1.d, x8
1235 ; CHECK-NEXT: mov x8, #4890909195324358655 // =0x43dfffffffffffff
1236 ; CHECK-NEXT: frintx z0.d, p0/m, z0.d
1237 ; CHECK-NEXT: mov z3.d, x8
1238 ; CHECK-NEXT: fcmge p1.d, p0/z, z0.d, z1.d
1239 ; CHECK-NEXT: movprfx z1, z0
1240 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z0.d
1241 ; CHECK-NEXT: fcmgt p2.d, p0/z, z0.d, z3.d
1242 ; CHECK-NEXT: mov z3.d, #0x7fffffffffffffff
1243 ; CHECK-NEXT: not p1.b, p0/z, p1.b
1244 ; CHECK-NEXT: fcmuo p0.d, p0/z, z0.d, z0.d
1245 ; CHECK-NEXT: mov z1.d, p1/m, z2.d
1246 ; CHECK-NEXT: sel z0.d, p2, z3.d, z1.d
1247 ; CHECK-NEXT: mov z0.d, p0/m, #0 // =0x0
1249 %a = call <vscale x 2 x iXLen> @llvm.lrint.nxv2iXLen.nxv2f64(<vscale x 2 x double> %x)
1250 ret <vscale x 2 x iXLen> %a
1252 declare <vscale x 2 x iXLen> @llvm.lrint.nxv2iXLen.nxv2f64(<vscale x 2 x double>)
1254 define <vscale x 4 x iXLen> @lrint_v4f64(<vscale x 4 x double> %x) {
1255 ; CHECK-LABEL: lrint_v4f64:
1257 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
1258 ; CHECK-NEXT: addvl sp, sp, #-1
1259 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
1260 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 8 * VG
1261 ; CHECK-NEXT: .cfi_offset w29, -16
1262 ; CHECK-NEXT: ptrue p0.d
1263 ; CHECK-NEXT: mov x8, #-4332462841530417152 // =0xc3e0000000000000
1264 ; CHECK-NEXT: mov z6.d, #0x7fffffffffffffff
1265 ; CHECK-NEXT: mov z2.d, x8
1266 ; CHECK-NEXT: mov x8, #4890909195324358655 // =0x43dfffffffffffff
1267 ; CHECK-NEXT: frintx z0.d, p0/m, z0.d
1268 ; CHECK-NEXT: frintx z1.d, p0/m, z1.d
1269 ; CHECK-NEXT: mov z3.d, x8
1270 ; CHECK-NEXT: fcmge p1.d, p0/z, z0.d, z2.d
1271 ; CHECK-NEXT: fcmge p2.d, p0/z, z1.d, z2.d
1272 ; CHECK-NEXT: mov z2.d, #0x8000000000000000
1273 ; CHECK-NEXT: movprfx z4, z0
1274 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z0.d
1275 ; CHECK-NEXT: movprfx z5, z1
1276 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z1.d
1277 ; CHECK-NEXT: fcmgt p3.d, p0/z, z0.d, z3.d
1278 ; CHECK-NEXT: fcmgt p4.d, p0/z, z1.d, z3.d
1279 ; CHECK-NEXT: not p1.b, p0/z, p1.b
1280 ; CHECK-NEXT: not p2.b, p0/z, p2.b
1281 ; CHECK-NEXT: sel z3.d, p1, z2.d, z4.d
1282 ; CHECK-NEXT: fcmuo p1.d, p0/z, z0.d, z0.d
1283 ; CHECK-NEXT: fcmuo p0.d, p0/z, z1.d, z1.d
1284 ; CHECK-NEXT: sel z2.d, p2, z2.d, z5.d
1285 ; CHECK-NEXT: sel z0.d, p3, z6.d, z3.d
1286 ; CHECK-NEXT: sel z1.d, p4, z6.d, z2.d
1287 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
1288 ; CHECK-NEXT: mov z0.d, p1/m, #0 // =0x0
1289 ; CHECK-NEXT: mov z1.d, p0/m, #0 // =0x0
1290 ; CHECK-NEXT: addvl sp, sp, #1
1291 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
1293 %a = call <vscale x 4 x iXLen> @llvm.lrint.nxv4iXLen.nxv4f64(<vscale x 4 x double> %x)
1294 ret <vscale x 4 x iXLen> %a
1296 declare <vscale x 4 x iXLen> @llvm.lrint.nxv4iXLen.nxv4f64(<vscale x 4 x double>)
1298 define <vscale x 8 x iXLen> @lrint_v8f64(<vscale x 8 x double> %x) {
1299 ; CHECK-LABEL: lrint_v8f64:
1301 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
1302 ; CHECK-NEXT: addvl sp, sp, #-1
1303 ; CHECK-NEXT: str p7, [sp, #4, mul vl] // 2-byte Folded Spill
1304 ; CHECK-NEXT: str p6, [sp, #5, mul vl] // 2-byte Folded Spill
1305 ; CHECK-NEXT: str p5, [sp, #6, mul vl] // 2-byte Folded Spill
1306 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
1307 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 8 * VG
1308 ; CHECK-NEXT: .cfi_offset w29, -16
1309 ; CHECK-NEXT: ptrue p0.d
1310 ; CHECK-NEXT: mov x8, #-4332462841530417152 // =0xc3e0000000000000
1311 ; CHECK-NEXT: mov z5.d, #0x8000000000000000
1312 ; CHECK-NEXT: mov z4.d, x8
1313 ; CHECK-NEXT: mov x8, #4890909195324358655 // =0x43dfffffffffffff
1314 ; CHECK-NEXT: mov z26.d, #0x7fffffffffffffff
1315 ; CHECK-NEXT: frintx z0.d, p0/m, z0.d
1316 ; CHECK-NEXT: frintx z1.d, p0/m, z1.d
1317 ; CHECK-NEXT: frintx z2.d, p0/m, z2.d
1318 ; CHECK-NEXT: frintx z3.d, p0/m, z3.d
1319 ; CHECK-NEXT: mov z6.d, x8
1320 ; CHECK-NEXT: fcmge p1.d, p0/z, z0.d, z4.d
1321 ; CHECK-NEXT: fcmge p2.d, p0/z, z1.d, z4.d
1322 ; CHECK-NEXT: fcmge p3.d, p0/z, z2.d, z4.d
1323 ; CHECK-NEXT: fcmge p4.d, p0/z, z3.d, z4.d
1324 ; CHECK-NEXT: movprfx z4, z0
1325 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z0.d
1326 ; CHECK-NEXT: movprfx z7, z1
1327 ; CHECK-NEXT: fcvtzs z7.d, p0/m, z1.d
1328 ; CHECK-NEXT: movprfx z24, z2
1329 ; CHECK-NEXT: fcvtzs z24.d, p0/m, z2.d
1330 ; CHECK-NEXT: movprfx z25, z3
1331 ; CHECK-NEXT: fcvtzs z25.d, p0/m, z3.d
1332 ; CHECK-NEXT: fcmgt p7.d, p0/z, z2.d, z6.d
1333 ; CHECK-NEXT: fcmgt p5.d, p0/z, z0.d, z6.d
1334 ; CHECK-NEXT: fcmgt p6.d, p0/z, z1.d, z6.d
1335 ; CHECK-NEXT: not p1.b, p0/z, p1.b
1336 ; CHECK-NEXT: not p2.b, p0/z, p2.b
1337 ; CHECK-NEXT: not p3.b, p0/z, p3.b
1338 ; CHECK-NEXT: mov z4.d, p1/m, z5.d
1339 ; CHECK-NEXT: fcmgt p1.d, p0/z, z3.d, z6.d
1340 ; CHECK-NEXT: not p4.b, p0/z, p4.b
1341 ; CHECK-NEXT: sel z6.d, p2, z5.d, z7.d
1342 ; CHECK-NEXT: fcmuo p2.d, p0/z, z0.d, z0.d
1343 ; CHECK-NEXT: sel z7.d, p3, z5.d, z24.d
1344 ; CHECK-NEXT: fcmuo p3.d, p0/z, z1.d, z1.d
1345 ; CHECK-NEXT: sel z5.d, p4, z5.d, z25.d
1346 ; CHECK-NEXT: fcmuo p4.d, p0/z, z2.d, z2.d
1347 ; CHECK-NEXT: fcmuo p0.d, p0/z, z3.d, z3.d
1348 ; CHECK-NEXT: sel z0.d, p5, z26.d, z4.d
1349 ; CHECK-NEXT: sel z1.d, p6, z26.d, z6.d
1350 ; CHECK-NEXT: ldr p6, [sp, #5, mul vl] // 2-byte Folded Reload
1351 ; CHECK-NEXT: sel z2.d, p7, z26.d, z7.d
1352 ; CHECK-NEXT: ldr p7, [sp, #4, mul vl] // 2-byte Folded Reload
1353 ; CHECK-NEXT: sel z3.d, p1, z26.d, z5.d
1354 ; CHECK-NEXT: ldr p5, [sp, #6, mul vl] // 2-byte Folded Reload
1355 ; CHECK-NEXT: mov z0.d, p2/m, #0 // =0x0
1356 ; CHECK-NEXT: mov z1.d, p3/m, #0 // =0x0
1357 ; CHECK-NEXT: mov z2.d, p4/m, #0 // =0x0
1358 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
1359 ; CHECK-NEXT: mov z3.d, p0/m, #0 // =0x0
1360 ; CHECK-NEXT: addvl sp, sp, #1
1361 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
1363 %a = call <vscale x 8 x iXLen> @llvm.lrint.nxv8iXLen.nxv8f64(<vscale x 8 x double> %x)
1364 ret <vscale x 8 x iXLen> %a
1366 declare <vscale x 8 x iXLen> @llvm.lrint.nxv8iXLen.nxv8f64(<vscale x 8 x double>)
1368 define <vscale x 16 x iXLen> @lrint_v16f64(<vscale x 16 x double> %x) {
1369 ; CHECK-LABEL: lrint_v16f64:
1371 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
1372 ; CHECK-NEXT: addvl sp, sp, #-2
1373 ; CHECK-NEXT: str p10, [sp, #1, mul vl] // 2-byte Folded Spill
1374 ; CHECK-NEXT: str p9, [sp, #2, mul vl] // 2-byte Folded Spill
1375 ; CHECK-NEXT: str p8, [sp, #3, mul vl] // 2-byte Folded Spill
1376 ; CHECK-NEXT: str p7, [sp, #4, mul vl] // 2-byte Folded Spill
1377 ; CHECK-NEXT: str p6, [sp, #5, mul vl] // 2-byte Folded Spill
1378 ; CHECK-NEXT: str p5, [sp, #6, mul vl] // 2-byte Folded Spill
1379 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
1380 ; CHECK-NEXT: str z8, [sp, #1, mul vl] // 16-byte Folded Spill
1381 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 16 * VG
1382 ; CHECK-NEXT: .cfi_offset w29, -16
1383 ; CHECK-NEXT: .cfi_escape 0x10, 0x48, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x78, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d8 @ cfa - 16 - 8 * VG
1384 ; CHECK-NEXT: ptrue p0.d
1385 ; CHECK-NEXT: mov x8, #-4332462841530417152 // =0xc3e0000000000000
1386 ; CHECK-NEXT: mov z24.d, #0x7fffffffffffffff
1387 ; CHECK-NEXT: mov z25.d, x8
1388 ; CHECK-NEXT: mov x8, #4890909195324358655 // =0x43dfffffffffffff
1389 ; CHECK-NEXT: movprfx z26, z0
1390 ; CHECK-NEXT: frintx z26.d, p0/m, z0.d
1391 ; CHECK-NEXT: movprfx z27, z1
1392 ; CHECK-NEXT: frintx z27.d, p0/m, z1.d
1393 ; CHECK-NEXT: frintx z2.d, p0/m, z2.d
1394 ; CHECK-NEXT: mov z0.d, #0x8000000000000000
1395 ; CHECK-NEXT: mov z1.d, x8
1396 ; CHECK-NEXT: frintx z3.d, p0/m, z3.d
1397 ; CHECK-NEXT: movprfx z28, z4
1398 ; CHECK-NEXT: frintx z28.d, p0/m, z4.d
1399 ; CHECK-NEXT: frintx z5.d, p0/m, z5.d
1400 ; CHECK-NEXT: frintx z6.d, p0/m, z6.d
1401 ; CHECK-NEXT: frintx z7.d, p0/m, z7.d
1402 ; CHECK-NEXT: fcmge p1.d, p0/z, z26.d, z25.d
1403 ; CHECK-NEXT: fcmge p2.d, p0/z, z27.d, z25.d
1404 ; CHECK-NEXT: movprfx z4, z26
1405 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z26.d
1406 ; CHECK-NEXT: fcmge p5.d, p0/z, z2.d, z25.d
1407 ; CHECK-NEXT: movprfx z29, z27
1408 ; CHECK-NEXT: fcvtzs z29.d, p0/m, z27.d
1409 ; CHECK-NEXT: fcmgt p3.d, p0/z, z26.d, z1.d
1410 ; CHECK-NEXT: fcmge p6.d, p0/z, z3.d, z25.d
1411 ; CHECK-NEXT: fcmge p8.d, p0/z, z5.d, z25.d
1412 ; CHECK-NEXT: fcmgt p7.d, p0/z, z27.d, z1.d
1413 ; CHECK-NEXT: fcmge p9.d, p0/z, z6.d, z25.d
1414 ; CHECK-NEXT: movprfx z30, z28
1415 ; CHECK-NEXT: fcvtzs z30.d, p0/m, z28.d
1416 ; CHECK-NEXT: fcmge p10.d, p0/z, z7.d, z25.d
1417 ; CHECK-NEXT: not p4.b, p0/z, p1.b
1418 ; CHECK-NEXT: fcmuo p1.d, p0/z, z26.d, z26.d
1419 ; CHECK-NEXT: movprfx z26, z2
1420 ; CHECK-NEXT: fcvtzs z26.d, p0/m, z2.d
1421 ; CHECK-NEXT: not p2.b, p0/z, p2.b
1422 ; CHECK-NEXT: movprfx z31, z6
1423 ; CHECK-NEXT: fcvtzs z31.d, p0/m, z6.d
1424 ; CHECK-NEXT: movprfx z8, z7
1425 ; CHECK-NEXT: fcvtzs z8.d, p0/m, z7.d
1426 ; CHECK-NEXT: mov z4.d, p4/m, z0.d
1427 ; CHECK-NEXT: fcmge p4.d, p0/z, z28.d, z25.d
1428 ; CHECK-NEXT: not p5.b, p0/z, p5.b
1429 ; CHECK-NEXT: mov z29.d, p2/m, z0.d
1430 ; CHECK-NEXT: fcmuo p2.d, p0/z, z27.d, z27.d
1431 ; CHECK-NEXT: movprfx z27, z3
1432 ; CHECK-NEXT: fcvtzs z27.d, p0/m, z3.d
1433 ; CHECK-NEXT: sel z25.d, p5, z0.d, z26.d
1434 ; CHECK-NEXT: movprfx z26, z5
1435 ; CHECK-NEXT: fcvtzs z26.d, p0/m, z5.d
1436 ; CHECK-NEXT: not p6.b, p0/z, p6.b
1437 ; CHECK-NEXT: not p5.b, p0/z, p8.b
1438 ; CHECK-NEXT: fcmgt p8.d, p0/z, z2.d, z1.d
1439 ; CHECK-NEXT: not p4.b, p0/z, p4.b
1440 ; CHECK-NEXT: mov z27.d, p6/m, z0.d
1441 ; CHECK-NEXT: not p6.b, p0/z, p9.b
1442 ; CHECK-NEXT: fcmuo p9.d, p0/z, z2.d, z2.d
1443 ; CHECK-NEXT: mov z30.d, p4/m, z0.d
1444 ; CHECK-NEXT: not p4.b, p0/z, p10.b
1445 ; CHECK-NEXT: fcmgt p10.d, p0/z, z3.d, z1.d
1446 ; CHECK-NEXT: mov z26.d, p5/m, z0.d
1447 ; CHECK-NEXT: fcmgt p5.d, p0/z, z28.d, z1.d
1448 ; CHECK-NEXT: mov z31.d, p6/m, z0.d
1449 ; CHECK-NEXT: mov z8.d, p4/m, z0.d
1450 ; CHECK-NEXT: sel z0.d, p3, z24.d, z4.d
1451 ; CHECK-NEXT: fcmgt p3.d, p0/z, z5.d, z1.d
1452 ; CHECK-NEXT: fcmgt p4.d, p0/z, z6.d, z1.d
1453 ; CHECK-NEXT: fcmgt p6.d, p0/z, z7.d, z1.d
1454 ; CHECK-NEXT: sel z1.d, p7, z24.d, z29.d
1455 ; CHECK-NEXT: fcmuo p7.d, p0/z, z3.d, z3.d
1456 ; CHECK-NEXT: sel z2.d, p8, z24.d, z25.d
1457 ; CHECK-NEXT: sel z3.d, p10, z24.d, z27.d
1458 ; CHECK-NEXT: sel z4.d, p5, z24.d, z30.d
1459 ; CHECK-NEXT: fcmuo p5.d, p0/z, z28.d, z28.d
1460 ; CHECK-NEXT: fcmuo p8.d, p0/z, z5.d, z5.d
1461 ; CHECK-NEXT: fcmuo p10.d, p0/z, z6.d, z6.d
1462 ; CHECK-NEXT: sel z5.d, p3, z24.d, z26.d
1463 ; CHECK-NEXT: fcmuo p0.d, p0/z, z7.d, z7.d
1464 ; CHECK-NEXT: sel z6.d, p4, z24.d, z31.d
1465 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
1466 ; CHECK-NEXT: sel z7.d, p6, z24.d, z8.d
1467 ; CHECK-NEXT: ldr z8, [sp, #1, mul vl] // 16-byte Folded Reload
1468 ; CHECK-NEXT: ldr p6, [sp, #5, mul vl] // 2-byte Folded Reload
1469 ; CHECK-NEXT: mov z2.d, p9/m, #0 // =0x0
1470 ; CHECK-NEXT: ldr p9, [sp, #2, mul vl] // 2-byte Folded Reload
1471 ; CHECK-NEXT: mov z3.d, p7/m, #0 // =0x0
1472 ; CHECK-NEXT: mov z4.d, p5/m, #0 // =0x0
1473 ; CHECK-NEXT: ldr p7, [sp, #4, mul vl] // 2-byte Folded Reload
1474 ; CHECK-NEXT: mov z5.d, p8/m, #0 // =0x0
1475 ; CHECK-NEXT: mov z6.d, p10/m, #0 // =0x0
1476 ; CHECK-NEXT: ldr p10, [sp, #1, mul vl] // 2-byte Folded Reload
1477 ; CHECK-NEXT: mov z0.d, p1/m, #0 // =0x0
1478 ; CHECK-NEXT: mov z1.d, p2/m, #0 // =0x0
1479 ; CHECK-NEXT: ldr p8, [sp, #3, mul vl] // 2-byte Folded Reload
1480 ; CHECK-NEXT: mov z7.d, p0/m, #0 // =0x0
1481 ; CHECK-NEXT: ldr p5, [sp, #6, mul vl] // 2-byte Folded Reload
1482 ; CHECK-NEXT: addvl sp, sp, #2
1483 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
1485 %a = call <vscale x 16 x iXLen> @llvm.lrint.nxv16iXLen.nxv16f64(<vscale x 16 x double> %x)
1486 ret <vscale x 16 x iXLen> %a
1488 declare <vscale x 16 x iXLen> @llvm.lrint.nxv16iXLen.nxv16f64(<vscale x 16 x double>)
1490 define <vscale x 32 x iXLen> @lrint_v32f64(<vscale x 32 x double> %x) {
1491 ; CHECK-LABEL: lrint_v32f64:
1493 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
1494 ; CHECK-NEXT: addvl sp, sp, #-12
1495 ; CHECK-NEXT: str p8, [sp, #3, mul vl] // 2-byte Folded Spill
1496 ; CHECK-NEXT: str p7, [sp, #4, mul vl] // 2-byte Folded Spill
1497 ; CHECK-NEXT: str p6, [sp, #5, mul vl] // 2-byte Folded Spill
1498 ; CHECK-NEXT: str p5, [sp, #6, mul vl] // 2-byte Folded Spill
1499 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
1500 ; CHECK-NEXT: str z18, [sp, #1, mul vl] // 16-byte Folded Spill
1501 ; CHECK-NEXT: str z17, [sp, #2, mul vl] // 16-byte Folded Spill
1502 ; CHECK-NEXT: str z16, [sp, #3, mul vl] // 16-byte Folded Spill
1503 ; CHECK-NEXT: str z15, [sp, #4, mul vl] // 16-byte Folded Spill
1504 ; CHECK-NEXT: str z14, [sp, #5, mul vl] // 16-byte Folded Spill
1505 ; CHECK-NEXT: str z13, [sp, #6, mul vl] // 16-byte Folded Spill
1506 ; CHECK-NEXT: str z12, [sp, #7, mul vl] // 16-byte Folded Spill
1507 ; CHECK-NEXT: str z11, [sp, #8, mul vl] // 16-byte Folded Spill
1508 ; CHECK-NEXT: str z10, [sp, #9, mul vl] // 16-byte Folded Spill
1509 ; CHECK-NEXT: str z9, [sp, #10, mul vl] // 16-byte Folded Spill
1510 ; CHECK-NEXT: str z8, [sp, #11, mul vl] // 16-byte Folded Spill
1511 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0xe0, 0x00, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 96 * VG
1512 ; CHECK-NEXT: .cfi_offset w29, -16
1513 ; CHECK-NEXT: .cfi_escape 0x10, 0x48, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x78, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d8 @ cfa - 16 - 8 * VG
1514 ; CHECK-NEXT: .cfi_escape 0x10, 0x49, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x70, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d9 @ cfa - 16 - 16 * VG
1515 ; CHECK-NEXT: .cfi_escape 0x10, 0x4a, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x68, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d10 @ cfa - 16 - 24 * VG
1516 ; CHECK-NEXT: .cfi_escape 0x10, 0x4b, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x60, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d11 @ cfa - 16 - 32 * VG
1517 ; CHECK-NEXT: .cfi_escape 0x10, 0x4c, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x58, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d12 @ cfa - 16 - 40 * VG
1518 ; CHECK-NEXT: .cfi_escape 0x10, 0x4d, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x50, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d13 @ cfa - 16 - 48 * VG
1519 ; CHECK-NEXT: .cfi_escape 0x10, 0x4e, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x48, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d14 @ cfa - 16 - 56 * VG
1520 ; CHECK-NEXT: .cfi_escape 0x10, 0x4f, 0x0a, 0x11, 0x70, 0x22, 0x11, 0x40, 0x92, 0x2e, 0x00, 0x1e, 0x22 // $d15 @ cfa - 16 - 64 * VG
1521 ; CHECK-NEXT: ptrue p1.b
1522 ; CHECK-NEXT: rdvl x9, #8
1523 ; CHECK-NEXT: rdvl x10, #9
1524 ; CHECK-NEXT: ptrue p0.d
1525 ; CHECK-NEXT: rdvl x11, #10
1526 ; CHECK-NEXT: mov x12, #-4332462841530417152 // =0xc3e0000000000000
1527 ; CHECK-NEXT: ld1b { z0.b }, p1/z, [x0, x9]
1528 ; CHECK-NEXT: ld1b { z1.b }, p1/z, [x0, x10]
1529 ; CHECK-NEXT: mov z2.d, x12
1530 ; CHECK-NEXT: rdvl x14, #13
1531 ; CHECK-NEXT: rdvl x13, #12
1532 ; CHECK-NEXT: rdvl x12, #11
1533 ; CHECK-NEXT: ld1b { z6.b }, p1/z, [x0, x14]
1534 ; CHECK-NEXT: ld1b { z7.b }, p1/z, [x0, x13]
1535 ; CHECK-NEXT: mov z3.d, #0x8000000000000000
1536 ; CHECK-NEXT: movprfx z24, z0
1537 ; CHECK-NEXT: frintx z24.d, p0/m, z0.d
1538 ; CHECK-NEXT: ld1b { z0.b }, p1/z, [x0, x11]
1539 ; CHECK-NEXT: movprfx z5, z1
1540 ; CHECK-NEXT: frintx z5.d, p0/m, z1.d
1541 ; CHECK-NEXT: ld1b { z1.b }, p1/z, [x0, x12]
1542 ; CHECK-NEXT: mov x15, #4890909195324358655 // =0x43dfffffffffffff
1543 ; CHECK-NEXT: rdvl x16, #15
1544 ; CHECK-NEXT: movprfx z30, z6
1545 ; CHECK-NEXT: frintx z30.d, p0/m, z6.d
1546 ; CHECK-NEXT: movprfx z28, z7
1547 ; CHECK-NEXT: frintx z28.d, p0/m, z7.d
1548 ; CHECK-NEXT: ld1b { z8.b }, p1/z, [x0, x16]
1549 ; CHECK-NEXT: movprfx z4, z0
1550 ; CHECK-NEXT: frintx z4.d, p0/m, z0.d
1551 ; CHECK-NEXT: mov z0.d, #0x7fffffffffffffff
1552 ; CHECK-NEXT: ld1d { z18.d }, p0/z, [x0]
1553 ; CHECK-NEXT: fcmge p3.d, p0/z, z5.d, z2.d
1554 ; CHECK-NEXT: fcmge p2.d, p0/z, z24.d, z2.d
1555 ; CHECK-NEXT: movprfx z6, z5
1556 ; CHECK-NEXT: fcvtzs z6.d, p0/m, z5.d
1557 ; CHECK-NEXT: movprfx z27, z1
1558 ; CHECK-NEXT: frintx z27.d, p0/m, z1.d
1559 ; CHECK-NEXT: movprfx z25, z24
1560 ; CHECK-NEXT: fcvtzs z25.d, p0/m, z24.d
1561 ; CHECK-NEXT: mov z1.d, x15
1562 ; CHECK-NEXT: rdvl x15, #14
1563 ; CHECK-NEXT: movprfx z9, z28
1564 ; CHECK-NEXT: fcvtzs z9.d, p0/m, z28.d
1565 ; CHECK-NEXT: movprfx z13, z8
1566 ; CHECK-NEXT: frintx z13.d, p0/m, z8.d
1567 ; CHECK-NEXT: fcmge p4.d, p0/z, z4.d, z2.d
1568 ; CHECK-NEXT: movprfx z7, z4
1569 ; CHECK-NEXT: fcvtzs z7.d, p0/m, z4.d
1570 ; CHECK-NEXT: ld1d { z15.d }, p0/z, [x0, #2, mul vl]
1571 ; CHECK-NEXT: not p3.b, p0/z, p3.b
1572 ; CHECK-NEXT: fcmgt p5.d, p0/z, z24.d, z1.d
1573 ; CHECK-NEXT: fcmgt p6.d, p0/z, z5.d, z1.d
1574 ; CHECK-NEXT: not p2.b, p0/z, p2.b
1575 ; CHECK-NEXT: fcmge p7.d, p0/z, z27.d, z2.d
1576 ; CHECK-NEXT: movprfx z26, z27
1577 ; CHECK-NEXT: fcvtzs z26.d, p0/m, z27.d
1578 ; CHECK-NEXT: sel z29.d, p3, z3.d, z6.d
1579 ; CHECK-NEXT: ld1b { z6.b }, p1/z, [x0, x15]
1580 ; CHECK-NEXT: fcmge p3.d, p0/z, z28.d, z2.d
1581 ; CHECK-NEXT: not p4.b, p0/z, p4.b
1582 ; CHECK-NEXT: mov z25.d, p2/m, z3.d
1583 ; CHECK-NEXT: fcmgt p2.d, p0/z, z4.d, z1.d
1584 ; CHECK-NEXT: movprfx z16, z13
1585 ; CHECK-NEXT: fcvtzs z16.d, p0/m, z13.d
1586 ; CHECK-NEXT: ld1d { z17.d }, p0/z, [x0, #1, mul vl]
1587 ; CHECK-NEXT: ld1d { z14.d }, p0/z, [x0, #3, mul vl]
1588 ; CHECK-NEXT: sel z31.d, p4, z3.d, z7.d
1589 ; CHECK-NEXT: movprfx z11, z6
1590 ; CHECK-NEXT: frintx z11.d, p0/m, z6.d
1591 ; CHECK-NEXT: not p7.b, p0/z, p7.b
1592 ; CHECK-NEXT: not p3.b, p0/z, p3.b
1593 ; CHECK-NEXT: sel z6.d, p5, z0.d, z25.d
1594 ; CHECK-NEXT: fcmgt p4.d, p0/z, z27.d, z1.d
1595 ; CHECK-NEXT: sel z7.d, p6, z0.d, z29.d
1596 ; CHECK-NEXT: mov z26.d, p7/m, z3.d
1597 ; CHECK-NEXT: fcmge p5.d, p0/z, z13.d, z2.d
1598 ; CHECK-NEXT: sel z25.d, p2, z0.d, z31.d
1599 ; CHECK-NEXT: fcmge p2.d, p0/z, z30.d, z2.d
1600 ; CHECK-NEXT: sel z29.d, p3, z3.d, z9.d
1601 ; CHECK-NEXT: fcmge p3.d, p0/z, z11.d, z2.d
1602 ; CHECK-NEXT: movprfx z31, z30
1603 ; CHECK-NEXT: fcvtzs z31.d, p0/m, z30.d
1604 ; CHECK-NEXT: movprfx z9, z11
1605 ; CHECK-NEXT: fcvtzs z9.d, p0/m, z11.d
1606 ; CHECK-NEXT: mov z26.d, p4/m, z0.d
1607 ; CHECK-NEXT: fcmgt p4.d, p0/z, z28.d, z1.d
1608 ; CHECK-NEXT: fcmgt p6.d, p0/z, z30.d, z1.d
1609 ; CHECK-NEXT: not p7.b, p0/z, p5.b
1610 ; CHECK-NEXT: fcmuo p5.d, p0/z, z27.d, z27.d
1611 ; CHECK-NEXT: fcmgt p8.d, p0/z, z13.d, z1.d
1612 ; CHECK-NEXT: not p2.b, p0/z, p2.b
1613 ; CHECK-NEXT: movprfx z27, z18
1614 ; CHECK-NEXT: frintx z27.d, p0/m, z18.d
1615 ; CHECK-NEXT: ld1d { z8.d }, p0/z, [x0, #7, mul vl]
1616 ; CHECK-NEXT: not p3.b, p0/z, p3.b
1617 ; CHECK-NEXT: mov z16.d, p7/m, z3.d
1618 ; CHECK-NEXT: fcmuo p7.d, p0/z, z13.d, z13.d
1619 ; CHECK-NEXT: mov z31.d, p2/m, z3.d
1620 ; CHECK-NEXT: fcmgt p2.d, p0/z, z11.d, z1.d
1621 ; CHECK-NEXT: mov z29.d, p4/m, z0.d
1622 ; CHECK-NEXT: mov z9.d, p3/m, z3.d
1623 ; CHECK-NEXT: fcmuo p3.d, p0/z, z28.d, z28.d
1624 ; CHECK-NEXT: fcmuo p4.d, p0/z, z30.d, z30.d
1625 ; CHECK-NEXT: movprfx z28, z17
1626 ; CHECK-NEXT: frintx z28.d, p0/m, z17.d
1627 ; CHECK-NEXT: movprfx z30, z15
1628 ; CHECK-NEXT: frintx z30.d, p0/m, z15.d
1629 ; CHECK-NEXT: ld1d { z13.d }, p0/z, [x0, #4, mul vl]
1630 ; CHECK-NEXT: mov z31.d, p6/m, z0.d
1631 ; CHECK-NEXT: fcmuo p6.d, p0/z, z11.d, z11.d
1632 ; CHECK-NEXT: sel z11.d, p8, z0.d, z16.d
1633 ; CHECK-NEXT: mov z9.d, p2/m, z0.d
1634 ; CHECK-NEXT: fcmuo p2.d, p0/z, z24.d, z24.d
1635 ; CHECK-NEXT: movprfx z24, z14
1636 ; CHECK-NEXT: frintx z24.d, p0/m, z14.d
1637 ; CHECK-NEXT: fcmge p8.d, p0/z, z27.d, z2.d
1638 ; CHECK-NEXT: ld1d { z10.d }, p0/z, [x0, #6, mul vl]
1639 ; CHECK-NEXT: ld1d { z12.d }, p0/z, [x0, #5, mul vl]
1640 ; CHECK-NEXT: mov z26.d, p5/m, #0 // =0x0
1641 ; CHECK-NEXT: mov z29.d, p3/m, #0 // =0x0
1642 ; CHECK-NEXT: fcmge p5.d, p0/z, z28.d, z2.d
1643 ; CHECK-NEXT: movprfx z14, z27
1644 ; CHECK-NEXT: fcvtzs z14.d, p0/m, z27.d
1645 ; CHECK-NEXT: fcmge p3.d, p0/z, z30.d, z2.d
1646 ; CHECK-NEXT: frintx z13.d, p0/m, z13.d
1647 ; CHECK-NEXT: mov z31.d, p4/m, #0 // =0x0
1648 ; CHECK-NEXT: fcmge p4.d, p0/z, z24.d, z2.d
1649 ; CHECK-NEXT: mov z9.d, p6/m, #0 // =0x0
1650 ; CHECK-NEXT: movprfx z15, z28
1651 ; CHECK-NEXT: fcvtzs z15.d, p0/m, z28.d
1652 ; CHECK-NEXT: not p6.b, p0/z, p8.b
1653 ; CHECK-NEXT: movprfx z16, z30
1654 ; CHECK-NEXT: fcvtzs z16.d, p0/m, z30.d
1655 ; CHECK-NEXT: frintx z12.d, p0/m, z12.d
1656 ; CHECK-NEXT: frintx z10.d, p0/m, z10.d
1657 ; CHECK-NEXT: movprfx z17, z24
1658 ; CHECK-NEXT: fcvtzs z17.d, p0/m, z24.d
1659 ; CHECK-NEXT: movprfx z18, z8
1660 ; CHECK-NEXT: frintx z18.d, p0/m, z8.d
1661 ; CHECK-NEXT: not p5.b, p0/z, p5.b
1662 ; CHECK-NEXT: sel z8.d, p6, z3.d, z14.d
1663 ; CHECK-NEXT: not p3.b, p0/z, p3.b
1664 ; CHECK-NEXT: fcmge p6.d, p0/z, z13.d, z2.d
1665 ; CHECK-NEXT: mov z11.d, p7/m, #0 // =0x0
1666 ; CHECK-NEXT: not p4.b, p0/z, p4.b
1667 ; CHECK-NEXT: sel z14.d, p5, z3.d, z15.d
1668 ; CHECK-NEXT: fcmuo p7.d, p0/z, z5.d, z5.d
1669 ; CHECK-NEXT: sel z15.d, p3, z3.d, z16.d
1670 ; CHECK-NEXT: movprfx z16, z13
1671 ; CHECK-NEXT: fcvtzs z16.d, p0/m, z13.d
1672 ; CHECK-NEXT: fcmge p5.d, p0/z, z12.d, z2.d
1673 ; CHECK-NEXT: fcmge p3.d, p0/z, z10.d, z2.d
1674 ; CHECK-NEXT: sel z5.d, p4, z3.d, z17.d
1675 ; CHECK-NEXT: fcmge p4.d, p0/z, z18.d, z2.d
1676 ; CHECK-NEXT: not p6.b, p0/z, p6.b
1677 ; CHECK-NEXT: movprfx z2, z12
1678 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z12.d
1679 ; CHECK-NEXT: movprfx z17, z10
1680 ; CHECK-NEXT: fcvtzs z17.d, p0/m, z10.d
1681 ; CHECK-NEXT: st1b { z11.b }, p1, [x8, x16]
1682 ; CHECK-NEXT: movprfx z11, z18
1683 ; CHECK-NEXT: fcvtzs z11.d, p0/m, z18.d
1684 ; CHECK-NEXT: mov z6.d, p2/m, #0 // =0x0
1685 ; CHECK-NEXT: st1b { z9.b }, p1, [x8, x15]
1686 ; CHECK-NEXT: sel z9.d, p6, z3.d, z16.d
1687 ; CHECK-NEXT: fcmuo p6.d, p0/z, z4.d, z4.d
1688 ; CHECK-NEXT: not p5.b, p0/z, p5.b
1689 ; CHECK-NEXT: fcmgt p2.d, p0/z, z18.d, z1.d
1690 ; CHECK-NEXT: mov z7.d, p7/m, #0 // =0x0
1691 ; CHECK-NEXT: not p3.b, p0/z, p3.b
1692 ; CHECK-NEXT: st1b { z31.b }, p1, [x8, x14]
1693 ; CHECK-NEXT: fcmgt p7.d, p0/z, z24.d, z1.d
1694 ; CHECK-NEXT: not p4.b, p0/z, p4.b
1695 ; CHECK-NEXT: mov z2.d, p5/m, z3.d
1696 ; CHECK-NEXT: fcmgt p5.d, p0/z, z28.d, z1.d
1697 ; CHECK-NEXT: sel z4.d, p3, z3.d, z17.d
1698 ; CHECK-NEXT: fcmgt p3.d, p0/z, z13.d, z1.d
1699 ; CHECK-NEXT: mov z25.d, p6/m, #0 // =0x0
1700 ; CHECK-NEXT: sel z3.d, p4, z3.d, z11.d
1701 ; CHECK-NEXT: fcmgt p4.d, p0/z, z10.d, z1.d
1702 ; CHECK-NEXT: fcmgt p6.d, p0/z, z12.d, z1.d
1703 ; CHECK-NEXT: st1b { z29.b }, p1, [x8, x13]
1704 ; CHECK-NEXT: st1b { z26.b }, p1, [x8, x12]
1705 ; CHECK-NEXT: sel z26.d, p5, z0.d, z14.d
1706 ; CHECK-NEXT: fcmgt p5.d, p0/z, z30.d, z1.d
1707 ; CHECK-NEXT: sel z29.d, p3, z0.d, z9.d
1708 ; CHECK-NEXT: fcmuo p3.d, p0/z, z18.d, z18.d
1709 ; CHECK-NEXT: mov z3.d, p2/m, z0.d
1710 ; CHECK-NEXT: st1b { z25.b }, p1, [x8, x11]
1711 ; CHECK-NEXT: fcmuo p2.d, p0/z, z10.d, z10.d
1712 ; CHECK-NEXT: mov z4.d, p4/m, z0.d
1713 ; CHECK-NEXT: fcmuo p4.d, p0/z, z12.d, z12.d
1714 ; CHECK-NEXT: st1b { z7.b }, p1, [x8, x10]
1715 ; CHECK-NEXT: mov z2.d, p6/m, z0.d
1716 ; CHECK-NEXT: st1b { z6.b }, p1, [x8, x9]
1717 ; CHECK-NEXT: fcmuo p1.d, p0/z, z13.d, z13.d
1718 ; CHECK-NEXT: fcmgt p6.d, p0/z, z27.d, z1.d
1719 ; CHECK-NEXT: mov z3.d, p3/m, #0 // =0x0
1720 ; CHECK-NEXT: fcmuo p3.d, p0/z, z24.d, z24.d
1721 ; CHECK-NEXT: sel z1.d, p7, z0.d, z5.d
1722 ; CHECK-NEXT: mov z4.d, p2/m, #0 // =0x0
1723 ; CHECK-NEXT: fcmuo p2.d, p0/z, z30.d, z30.d
1724 ; CHECK-NEXT: sel z5.d, p5, z0.d, z15.d
1725 ; CHECK-NEXT: mov z2.d, p4/m, #0 // =0x0
1726 ; CHECK-NEXT: fcmuo p4.d, p0/z, z28.d, z28.d
1727 ; CHECK-NEXT: mov z29.d, p1/m, #0 // =0x0
1728 ; CHECK-NEXT: fcmuo p1.d, p0/z, z27.d, z27.d
1729 ; CHECK-NEXT: sel z0.d, p6, z0.d, z8.d
1730 ; CHECK-NEXT: mov z1.d, p3/m, #0 // =0x0
1731 ; CHECK-NEXT: st1d { z3.d }, p0, [x8, #7, mul vl]
1732 ; CHECK-NEXT: mov z5.d, p2/m, #0 // =0x0
1733 ; CHECK-NEXT: st1d { z4.d }, p0, [x8, #6, mul vl]
1734 ; CHECK-NEXT: mov z26.d, p4/m, #0 // =0x0
1735 ; CHECK-NEXT: st1d { z2.d }, p0, [x8, #5, mul vl]
1736 ; CHECK-NEXT: mov z0.d, p1/m, #0 // =0x0
1737 ; CHECK-NEXT: st1d { z29.d }, p0, [x8, #4, mul vl]
1738 ; CHECK-NEXT: st1d { z1.d }, p0, [x8, #3, mul vl]
1739 ; CHECK-NEXT: st1d { z5.d }, p0, [x8, #2, mul vl]
1740 ; CHECK-NEXT: st1d { z26.d }, p0, [x8, #1, mul vl]
1741 ; CHECK-NEXT: st1d { z0.d }, p0, [x8]
1742 ; CHECK-NEXT: ldr z18, [sp, #1, mul vl] // 16-byte Folded Reload
1743 ; CHECK-NEXT: ldr z17, [sp, #2, mul vl] // 16-byte Folded Reload
1744 ; CHECK-NEXT: ldr z16, [sp, #3, mul vl] // 16-byte Folded Reload
1745 ; CHECK-NEXT: ldr z15, [sp, #4, mul vl] // 16-byte Folded Reload
1746 ; CHECK-NEXT: ldr z14, [sp, #5, mul vl] // 16-byte Folded Reload
1747 ; CHECK-NEXT: ldr z13, [sp, #6, mul vl] // 16-byte Folded Reload
1748 ; CHECK-NEXT: ldr z12, [sp, #7, mul vl] // 16-byte Folded Reload
1749 ; CHECK-NEXT: ldr z11, [sp, #8, mul vl] // 16-byte Folded Reload
1750 ; CHECK-NEXT: ldr z10, [sp, #9, mul vl] // 16-byte Folded Reload
1751 ; CHECK-NEXT: ldr z9, [sp, #10, mul vl] // 16-byte Folded Reload
1752 ; CHECK-NEXT: ldr z8, [sp, #11, mul vl] // 16-byte Folded Reload
1753 ; CHECK-NEXT: ldr p8, [sp, #3, mul vl] // 2-byte Folded Reload
1754 ; CHECK-NEXT: ldr p7, [sp, #4, mul vl] // 2-byte Folded Reload
1755 ; CHECK-NEXT: ldr p6, [sp, #5, mul vl] // 2-byte Folded Reload
1756 ; CHECK-NEXT: ldr p5, [sp, #6, mul vl] // 2-byte Folded Reload
1757 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
1758 ; CHECK-NEXT: addvl sp, sp, #12
1759 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
1761 %a = call <vscale x 32 x iXLen> @llvm.lrint.nxv32iXLen.nxv16f64(<vscale x 32 x double> %x)
1762 ret <vscale x 32 x iXLen> %a
1764 declare <vscale x 32 x iXLen> @llvm.lrint.nxv32iXLen.nxv32f64(<vscale x 32 x double>)