1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s
7 declare <vscale x 1 x half> @llvm.vp.ceil.nxv1f16(<vscale x 1 x half>, <vscale x 1 x i1>, i32)
9 define <vscale x 1 x half> @vp_ceil_vv_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
10 ; CHECK-LABEL: vp_ceil_vv_nxv1f16:
12 ; CHECK-NEXT: lui a1, %hi(.LCPI0_0)
13 ; CHECK-NEXT: flh fa5, %lo(.LCPI0_0)(a1)
14 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
15 ; CHECK-NEXT: vfabs.v v9, v8, v0.t
16 ; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, mu
17 ; CHECK-NEXT: vmflt.vf v0, v9, fa5, v0.t
18 ; CHECK-NEXT: fsrmi a0, 3
19 ; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
20 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
22 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
23 ; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, mu
24 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
26 %v = call <vscale x 1 x half> @llvm.vp.ceil.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x i1> %m, i32 %evl)
27 ret <vscale x 1 x half> %v
30 define <vscale x 1 x half> @vp_ceil_vv_nxv1f16_unmasked(<vscale x 1 x half> %va, i32 zeroext %evl) {
31 ; CHECK-LABEL: vp_ceil_vv_nxv1f16_unmasked:
33 ; CHECK-NEXT: lui a1, %hi(.LCPI1_0)
34 ; CHECK-NEXT: flh fa5, %lo(.LCPI1_0)(a1)
35 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
36 ; CHECK-NEXT: vfabs.v v9, v8
37 ; CHECK-NEXT: vmflt.vf v0, v9, fa5
38 ; CHECK-NEXT: fsrmi a0, 3
39 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
41 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
42 ; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, mu
43 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
45 %v = call <vscale x 1 x half> @llvm.vp.ceil.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x i1> splat (i1 true), i32 %evl)
46 ret <vscale x 1 x half> %v
49 declare <vscale x 2 x half> @llvm.vp.ceil.nxv2f16(<vscale x 2 x half>, <vscale x 2 x i1>, i32)
51 define <vscale x 2 x half> @vp_ceil_vv_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x i1> %m, i32 zeroext %evl) {
52 ; CHECK-LABEL: vp_ceil_vv_nxv2f16:
54 ; CHECK-NEXT: lui a1, %hi(.LCPI2_0)
55 ; CHECK-NEXT: flh fa5, %lo(.LCPI2_0)(a1)
56 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
57 ; CHECK-NEXT: vfabs.v v9, v8, v0.t
58 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, mu
59 ; CHECK-NEXT: vmflt.vf v0, v9, fa5, v0.t
60 ; CHECK-NEXT: fsrmi a0, 3
61 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
62 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
64 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
65 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, mu
66 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
68 %v = call <vscale x 2 x half> @llvm.vp.ceil.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x i1> %m, i32 %evl)
69 ret <vscale x 2 x half> %v
72 define <vscale x 2 x half> @vp_ceil_vv_nxv2f16_unmasked(<vscale x 2 x half> %va, i32 zeroext %evl) {
73 ; CHECK-LABEL: vp_ceil_vv_nxv2f16_unmasked:
75 ; CHECK-NEXT: lui a1, %hi(.LCPI3_0)
76 ; CHECK-NEXT: flh fa5, %lo(.LCPI3_0)(a1)
77 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
78 ; CHECK-NEXT: vfabs.v v9, v8
79 ; CHECK-NEXT: vmflt.vf v0, v9, fa5
80 ; CHECK-NEXT: fsrmi a0, 3
81 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
83 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
84 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, mu
85 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
87 %v = call <vscale x 2 x half> @llvm.vp.ceil.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x i1> splat (i1 true), i32 %evl)
88 ret <vscale x 2 x half> %v
91 declare <vscale x 4 x half> @llvm.vp.ceil.nxv4f16(<vscale x 4 x half>, <vscale x 4 x i1>, i32)
93 define <vscale x 4 x half> @vp_ceil_vv_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x i1> %m, i32 zeroext %evl) {
94 ; CHECK-LABEL: vp_ceil_vv_nxv4f16:
96 ; CHECK-NEXT: lui a1, %hi(.LCPI4_0)
97 ; CHECK-NEXT: flh fa5, %lo(.LCPI4_0)(a1)
98 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
99 ; CHECK-NEXT: vfabs.v v9, v8, v0.t
100 ; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, mu
101 ; CHECK-NEXT: vmflt.vf v0, v9, fa5, v0.t
102 ; CHECK-NEXT: fsrmi a0, 3
103 ; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, ma
104 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
105 ; CHECK-NEXT: fsrm a0
106 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
107 ; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, mu
108 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
110 %v = call <vscale x 4 x half> @llvm.vp.ceil.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x i1> %m, i32 %evl)
111 ret <vscale x 4 x half> %v
114 define <vscale x 4 x half> @vp_ceil_vv_nxv4f16_unmasked(<vscale x 4 x half> %va, i32 zeroext %evl) {
115 ; CHECK-LABEL: vp_ceil_vv_nxv4f16_unmasked:
117 ; CHECK-NEXT: lui a1, %hi(.LCPI5_0)
118 ; CHECK-NEXT: flh fa5, %lo(.LCPI5_0)(a1)
119 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
120 ; CHECK-NEXT: vfabs.v v9, v8
121 ; CHECK-NEXT: vmflt.vf v0, v9, fa5
122 ; CHECK-NEXT: fsrmi a0, 3
123 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
124 ; CHECK-NEXT: fsrm a0
125 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
126 ; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, mu
127 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
129 %v = call <vscale x 4 x half> @llvm.vp.ceil.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x i1> splat (i1 true), i32 %evl)
130 ret <vscale x 4 x half> %v
133 declare <vscale x 8 x half> @llvm.vp.ceil.nxv8f16(<vscale x 8 x half>, <vscale x 8 x i1>, i32)
135 define <vscale x 8 x half> @vp_ceil_vv_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
136 ; CHECK-LABEL: vp_ceil_vv_nxv8f16:
138 ; CHECK-NEXT: lui a1, %hi(.LCPI6_0)
139 ; CHECK-NEXT: flh fa5, %lo(.LCPI6_0)(a1)
140 ; CHECK-NEXT: vmv1r.v v10, v0
141 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
142 ; CHECK-NEXT: vfabs.v v12, v8, v0.t
143 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, mu
144 ; CHECK-NEXT: vmflt.vf v10, v12, fa5, v0.t
145 ; CHECK-NEXT: fsrmi a0, 3
146 ; CHECK-NEXT: vmv1r.v v0, v10
147 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, ma
148 ; CHECK-NEXT: vfcvt.x.f.v v12, v8, v0.t
149 ; CHECK-NEXT: fsrm a0
150 ; CHECK-NEXT: vfcvt.f.x.v v12, v12, v0.t
151 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, mu
152 ; CHECK-NEXT: vfsgnj.vv v8, v12, v8, v0.t
154 %v = call <vscale x 8 x half> @llvm.vp.ceil.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x i1> %m, i32 %evl)
155 ret <vscale x 8 x half> %v
158 define <vscale x 8 x half> @vp_ceil_vv_nxv8f16_unmasked(<vscale x 8 x half> %va, i32 zeroext %evl) {
159 ; CHECK-LABEL: vp_ceil_vv_nxv8f16_unmasked:
161 ; CHECK-NEXT: lui a1, %hi(.LCPI7_0)
162 ; CHECK-NEXT: flh fa5, %lo(.LCPI7_0)(a1)
163 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
164 ; CHECK-NEXT: vfabs.v v10, v8
165 ; CHECK-NEXT: vmflt.vf v0, v10, fa5
166 ; CHECK-NEXT: fsrmi a0, 3
167 ; CHECK-NEXT: vfcvt.x.f.v v10, v8, v0.t
168 ; CHECK-NEXT: fsrm a0
169 ; CHECK-NEXT: vfcvt.f.x.v v10, v10, v0.t
170 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, mu
171 ; CHECK-NEXT: vfsgnj.vv v8, v10, v8, v0.t
173 %v = call <vscale x 8 x half> @llvm.vp.ceil.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x i1> splat (i1 true), i32 %evl)
174 ret <vscale x 8 x half> %v
177 declare <vscale x 16 x half> @llvm.vp.ceil.nxv16f16(<vscale x 16 x half>, <vscale x 16 x i1>, i32)
179 define <vscale x 16 x half> @vp_ceil_vv_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x i1> %m, i32 zeroext %evl) {
180 ; CHECK-LABEL: vp_ceil_vv_nxv16f16:
182 ; CHECK-NEXT: lui a1, %hi(.LCPI8_0)
183 ; CHECK-NEXT: flh fa5, %lo(.LCPI8_0)(a1)
184 ; CHECK-NEXT: vmv1r.v v12, v0
185 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
186 ; CHECK-NEXT: vfabs.v v16, v8, v0.t
187 ; CHECK-NEXT: vsetvli zero, zero, e16, m4, ta, mu
188 ; CHECK-NEXT: vmflt.vf v12, v16, fa5, v0.t
189 ; CHECK-NEXT: fsrmi a0, 3
190 ; CHECK-NEXT: vmv1r.v v0, v12
191 ; CHECK-NEXT: vsetvli zero, zero, e16, m4, ta, ma
192 ; CHECK-NEXT: vfcvt.x.f.v v16, v8, v0.t
193 ; CHECK-NEXT: fsrm a0
194 ; CHECK-NEXT: vfcvt.f.x.v v16, v16, v0.t
195 ; CHECK-NEXT: vsetvli zero, zero, e16, m4, ta, mu
196 ; CHECK-NEXT: vfsgnj.vv v8, v16, v8, v0.t
198 %v = call <vscale x 16 x half> @llvm.vp.ceil.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x i1> %m, i32 %evl)
199 ret <vscale x 16 x half> %v
202 define <vscale x 16 x half> @vp_ceil_vv_nxv16f16_unmasked(<vscale x 16 x half> %va, i32 zeroext %evl) {
203 ; CHECK-LABEL: vp_ceil_vv_nxv16f16_unmasked:
205 ; CHECK-NEXT: lui a1, %hi(.LCPI9_0)
206 ; CHECK-NEXT: flh fa5, %lo(.LCPI9_0)(a1)
207 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
208 ; CHECK-NEXT: vfabs.v v12, v8
209 ; CHECK-NEXT: vmflt.vf v0, v12, fa5
210 ; CHECK-NEXT: fsrmi a0, 3
211 ; CHECK-NEXT: vfcvt.x.f.v v12, v8, v0.t
212 ; CHECK-NEXT: fsrm a0
213 ; CHECK-NEXT: vfcvt.f.x.v v12, v12, v0.t
214 ; CHECK-NEXT: vsetvli zero, zero, e16, m4, ta, mu
215 ; CHECK-NEXT: vfsgnj.vv v8, v12, v8, v0.t
217 %v = call <vscale x 16 x half> @llvm.vp.ceil.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x i1> splat (i1 true), i32 %evl)
218 ret <vscale x 16 x half> %v
221 declare <vscale x 32 x half> @llvm.vp.ceil.nxv32f16(<vscale x 32 x half>, <vscale x 32 x i1>, i32)
223 define <vscale x 32 x half> @vp_ceil_vv_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x i1> %m, i32 zeroext %evl) {
224 ; CHECK-LABEL: vp_ceil_vv_nxv32f16:
226 ; CHECK-NEXT: lui a1, %hi(.LCPI10_0)
227 ; CHECK-NEXT: flh fa5, %lo(.LCPI10_0)(a1)
228 ; CHECK-NEXT: vmv1r.v v16, v0
229 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
230 ; CHECK-NEXT: vfabs.v v24, v8, v0.t
231 ; CHECK-NEXT: vsetvli zero, zero, e16, m8, ta, mu
232 ; CHECK-NEXT: vmflt.vf v16, v24, fa5, v0.t
233 ; CHECK-NEXT: fsrmi a0, 3
234 ; CHECK-NEXT: vmv1r.v v0, v16
235 ; CHECK-NEXT: vsetvli zero, zero, e16, m8, ta, ma
236 ; CHECK-NEXT: vfcvt.x.f.v v24, v8, v0.t
237 ; CHECK-NEXT: fsrm a0
238 ; CHECK-NEXT: vfcvt.f.x.v v24, v24, v0.t
239 ; CHECK-NEXT: vsetvli zero, zero, e16, m8, ta, mu
240 ; CHECK-NEXT: vfsgnj.vv v8, v24, v8, v0.t
242 %v = call <vscale x 32 x half> @llvm.vp.ceil.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x i1> %m, i32 %evl)
243 ret <vscale x 32 x half> %v
246 define <vscale x 32 x half> @vp_ceil_vv_nxv32f16_unmasked(<vscale x 32 x half> %va, i32 zeroext %evl) {
247 ; CHECK-LABEL: vp_ceil_vv_nxv32f16_unmasked:
249 ; CHECK-NEXT: lui a1, %hi(.LCPI11_0)
250 ; CHECK-NEXT: flh fa5, %lo(.LCPI11_0)(a1)
251 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
252 ; CHECK-NEXT: vfabs.v v16, v8
253 ; CHECK-NEXT: vmflt.vf v0, v16, fa5
254 ; CHECK-NEXT: fsrmi a0, 3
255 ; CHECK-NEXT: vfcvt.x.f.v v16, v8, v0.t
256 ; CHECK-NEXT: fsrm a0
257 ; CHECK-NEXT: vfcvt.f.x.v v16, v16, v0.t
258 ; CHECK-NEXT: vsetvli zero, zero, e16, m8, ta, mu
259 ; CHECK-NEXT: vfsgnj.vv v8, v16, v8, v0.t
261 %v = call <vscale x 32 x half> @llvm.vp.ceil.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x i1> splat (i1 true), i32 %evl)
262 ret <vscale x 32 x half> %v
265 declare <vscale x 1 x float> @llvm.vp.ceil.nxv1f32(<vscale x 1 x float>, <vscale x 1 x i1>, i32)
267 define <vscale x 1 x float> @vp_ceil_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
268 ; CHECK-LABEL: vp_ceil_vv_nxv1f32:
270 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
271 ; CHECK-NEXT: vfabs.v v9, v8, v0.t
272 ; CHECK-NEXT: lui a0, 307200
273 ; CHECK-NEXT: fmv.w.x fa5, a0
274 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, mu
275 ; CHECK-NEXT: vmflt.vf v0, v9, fa5, v0.t
276 ; CHECK-NEXT: fsrmi a0, 3
277 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
278 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
279 ; CHECK-NEXT: fsrm a0
280 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
281 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, mu
282 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
284 %v = call <vscale x 1 x float> @llvm.vp.ceil.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x i1> %m, i32 %evl)
285 ret <vscale x 1 x float> %v
288 define <vscale x 1 x float> @vp_ceil_vv_nxv1f32_unmasked(<vscale x 1 x float> %va, i32 zeroext %evl) {
289 ; CHECK-LABEL: vp_ceil_vv_nxv1f32_unmasked:
291 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
292 ; CHECK-NEXT: vfabs.v v9, v8
293 ; CHECK-NEXT: lui a0, 307200
294 ; CHECK-NEXT: fmv.w.x fa5, a0
295 ; CHECK-NEXT: vmflt.vf v0, v9, fa5
296 ; CHECK-NEXT: fsrmi a0, 3
297 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
298 ; CHECK-NEXT: fsrm a0
299 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
300 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, mu
301 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
303 %v = call <vscale x 1 x float> @llvm.vp.ceil.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x i1> splat (i1 true), i32 %evl)
304 ret <vscale x 1 x float> %v
307 declare <vscale x 2 x float> @llvm.vp.ceil.nxv2f32(<vscale x 2 x float>, <vscale x 2 x i1>, i32)
309 define <vscale x 2 x float> @vp_ceil_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x i1> %m, i32 zeroext %evl) {
310 ; CHECK-LABEL: vp_ceil_vv_nxv2f32:
312 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
313 ; CHECK-NEXT: vfabs.v v9, v8, v0.t
314 ; CHECK-NEXT: lui a0, 307200
315 ; CHECK-NEXT: fmv.w.x fa5, a0
316 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, mu
317 ; CHECK-NEXT: vmflt.vf v0, v9, fa5, v0.t
318 ; CHECK-NEXT: fsrmi a0, 3
319 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
320 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
321 ; CHECK-NEXT: fsrm a0
322 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
323 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, mu
324 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
326 %v = call <vscale x 2 x float> @llvm.vp.ceil.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x i1> %m, i32 %evl)
327 ret <vscale x 2 x float> %v
330 define <vscale x 2 x float> @vp_ceil_vv_nxv2f32_unmasked(<vscale x 2 x float> %va, i32 zeroext %evl) {
331 ; CHECK-LABEL: vp_ceil_vv_nxv2f32_unmasked:
333 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
334 ; CHECK-NEXT: vfabs.v v9, v8
335 ; CHECK-NEXT: lui a0, 307200
336 ; CHECK-NEXT: fmv.w.x fa5, a0
337 ; CHECK-NEXT: vmflt.vf v0, v9, fa5
338 ; CHECK-NEXT: fsrmi a0, 3
339 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
340 ; CHECK-NEXT: fsrm a0
341 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
342 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, mu
343 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
345 %v = call <vscale x 2 x float> @llvm.vp.ceil.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x i1> splat (i1 true), i32 %evl)
346 ret <vscale x 2 x float> %v
349 declare <vscale x 4 x float> @llvm.vp.ceil.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, i32)
351 define <vscale x 4 x float> @vp_ceil_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x i1> %m, i32 zeroext %evl) {
352 ; CHECK-LABEL: vp_ceil_vv_nxv4f32:
354 ; CHECK-NEXT: vmv1r.v v10, v0
355 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
356 ; CHECK-NEXT: vfabs.v v12, v8, v0.t
357 ; CHECK-NEXT: lui a0, 307200
358 ; CHECK-NEXT: fmv.w.x fa5, a0
359 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, mu
360 ; CHECK-NEXT: vmflt.vf v10, v12, fa5, v0.t
361 ; CHECK-NEXT: fsrmi a0, 3
362 ; CHECK-NEXT: vmv1r.v v0, v10
363 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
364 ; CHECK-NEXT: vfcvt.x.f.v v12, v8, v0.t
365 ; CHECK-NEXT: fsrm a0
366 ; CHECK-NEXT: vfcvt.f.x.v v12, v12, v0.t
367 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, mu
368 ; CHECK-NEXT: vfsgnj.vv v8, v12, v8, v0.t
370 %v = call <vscale x 4 x float> @llvm.vp.ceil.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x i1> %m, i32 %evl)
371 ret <vscale x 4 x float> %v
374 define <vscale x 4 x float> @vp_ceil_vv_nxv4f32_unmasked(<vscale x 4 x float> %va, i32 zeroext %evl) {
375 ; CHECK-LABEL: vp_ceil_vv_nxv4f32_unmasked:
377 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
378 ; CHECK-NEXT: vfabs.v v10, v8
379 ; CHECK-NEXT: lui a0, 307200
380 ; CHECK-NEXT: fmv.w.x fa5, a0
381 ; CHECK-NEXT: vmflt.vf v0, v10, fa5
382 ; CHECK-NEXT: fsrmi a0, 3
383 ; CHECK-NEXT: vfcvt.x.f.v v10, v8, v0.t
384 ; CHECK-NEXT: fsrm a0
385 ; CHECK-NEXT: vfcvt.f.x.v v10, v10, v0.t
386 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, mu
387 ; CHECK-NEXT: vfsgnj.vv v8, v10, v8, v0.t
389 %v = call <vscale x 4 x float> @llvm.vp.ceil.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x i1> splat (i1 true), i32 %evl)
390 ret <vscale x 4 x float> %v
393 declare <vscale x 8 x float> @llvm.vp.ceil.nxv8f32(<vscale x 8 x float>, <vscale x 8 x i1>, i32)
395 define <vscale x 8 x float> @vp_ceil_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
396 ; CHECK-LABEL: vp_ceil_vv_nxv8f32:
398 ; CHECK-NEXT: vmv1r.v v12, v0
399 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
400 ; CHECK-NEXT: vfabs.v v16, v8, v0.t
401 ; CHECK-NEXT: lui a0, 307200
402 ; CHECK-NEXT: fmv.w.x fa5, a0
403 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, mu
404 ; CHECK-NEXT: vmflt.vf v12, v16, fa5, v0.t
405 ; CHECK-NEXT: fsrmi a0, 3
406 ; CHECK-NEXT: vmv1r.v v0, v12
407 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
408 ; CHECK-NEXT: vfcvt.x.f.v v16, v8, v0.t
409 ; CHECK-NEXT: fsrm a0
410 ; CHECK-NEXT: vfcvt.f.x.v v16, v16, v0.t
411 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, mu
412 ; CHECK-NEXT: vfsgnj.vv v8, v16, v8, v0.t
414 %v = call <vscale x 8 x float> @llvm.vp.ceil.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x i1> %m, i32 %evl)
415 ret <vscale x 8 x float> %v
418 define <vscale x 8 x float> @vp_ceil_vv_nxv8f32_unmasked(<vscale x 8 x float> %va, i32 zeroext %evl) {
419 ; CHECK-LABEL: vp_ceil_vv_nxv8f32_unmasked:
421 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
422 ; CHECK-NEXT: vfabs.v v12, v8
423 ; CHECK-NEXT: lui a0, 307200
424 ; CHECK-NEXT: fmv.w.x fa5, a0
425 ; CHECK-NEXT: vmflt.vf v0, v12, fa5
426 ; CHECK-NEXT: fsrmi a0, 3
427 ; CHECK-NEXT: vfcvt.x.f.v v12, v8, v0.t
428 ; CHECK-NEXT: fsrm a0
429 ; CHECK-NEXT: vfcvt.f.x.v v12, v12, v0.t
430 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, mu
431 ; CHECK-NEXT: vfsgnj.vv v8, v12, v8, v0.t
433 %v = call <vscale x 8 x float> @llvm.vp.ceil.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x i1> splat (i1 true), i32 %evl)
434 ret <vscale x 8 x float> %v
437 declare <vscale x 16 x float> @llvm.vp.ceil.nxv16f32(<vscale x 16 x float>, <vscale x 16 x i1>, i32)
439 define <vscale x 16 x float> @vp_ceil_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x i1> %m, i32 zeroext %evl) {
440 ; CHECK-LABEL: vp_ceil_vv_nxv16f32:
442 ; CHECK-NEXT: vmv1r.v v16, v0
443 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
444 ; CHECK-NEXT: vfabs.v v24, v8, v0.t
445 ; CHECK-NEXT: lui a0, 307200
446 ; CHECK-NEXT: fmv.w.x fa5, a0
447 ; CHECK-NEXT: vsetvli zero, zero, e32, m8, ta, mu
448 ; CHECK-NEXT: vmflt.vf v16, v24, fa5, v0.t
449 ; CHECK-NEXT: fsrmi a0, 3
450 ; CHECK-NEXT: vmv1r.v v0, v16
451 ; CHECK-NEXT: vsetvli zero, zero, e32, m8, ta, ma
452 ; CHECK-NEXT: vfcvt.x.f.v v24, v8, v0.t
453 ; CHECK-NEXT: fsrm a0
454 ; CHECK-NEXT: vfcvt.f.x.v v24, v24, v0.t
455 ; CHECK-NEXT: vsetvli zero, zero, e32, m8, ta, mu
456 ; CHECK-NEXT: vfsgnj.vv v8, v24, v8, v0.t
458 %v = call <vscale x 16 x float> @llvm.vp.ceil.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x i1> %m, i32 %evl)
459 ret <vscale x 16 x float> %v
462 define <vscale x 16 x float> @vp_ceil_vv_nxv16f32_unmasked(<vscale x 16 x float> %va, i32 zeroext %evl) {
463 ; CHECK-LABEL: vp_ceil_vv_nxv16f32_unmasked:
465 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
466 ; CHECK-NEXT: vfabs.v v16, v8
467 ; CHECK-NEXT: lui a0, 307200
468 ; CHECK-NEXT: fmv.w.x fa5, a0
469 ; CHECK-NEXT: vmflt.vf v0, v16, fa5
470 ; CHECK-NEXT: fsrmi a0, 3
471 ; CHECK-NEXT: vfcvt.x.f.v v16, v8, v0.t
472 ; CHECK-NEXT: fsrm a0
473 ; CHECK-NEXT: vfcvt.f.x.v v16, v16, v0.t
474 ; CHECK-NEXT: vsetvli zero, zero, e32, m8, ta, mu
475 ; CHECK-NEXT: vfsgnj.vv v8, v16, v8, v0.t
477 %v = call <vscale x 16 x float> @llvm.vp.ceil.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x i1> splat (i1 true), i32 %evl)
478 ret <vscale x 16 x float> %v
481 declare <vscale x 1 x double> @llvm.vp.ceil.nxv1f64(<vscale x 1 x double>, <vscale x 1 x i1>, i32)
483 define <vscale x 1 x double> @vp_ceil_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
484 ; CHECK-LABEL: vp_ceil_vv_nxv1f64:
486 ; CHECK-NEXT: lui a1, %hi(.LCPI22_0)
487 ; CHECK-NEXT: fld fa5, %lo(.LCPI22_0)(a1)
488 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
489 ; CHECK-NEXT: vfabs.v v9, v8, v0.t
490 ; CHECK-NEXT: vsetvli zero, zero, e64, m1, ta, mu
491 ; CHECK-NEXT: vmflt.vf v0, v9, fa5, v0.t
492 ; CHECK-NEXT: fsrmi a0, 3
493 ; CHECK-NEXT: vsetvli zero, zero, e64, m1, ta, ma
494 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
495 ; CHECK-NEXT: fsrm a0
496 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
497 ; CHECK-NEXT: vsetvli zero, zero, e64, m1, ta, mu
498 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
500 %v = call <vscale x 1 x double> @llvm.vp.ceil.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x i1> %m, i32 %evl)
501 ret <vscale x 1 x double> %v
504 define <vscale x 1 x double> @vp_ceil_vv_nxv1f64_unmasked(<vscale x 1 x double> %va, i32 zeroext %evl) {
505 ; CHECK-LABEL: vp_ceil_vv_nxv1f64_unmasked:
507 ; CHECK-NEXT: lui a1, %hi(.LCPI23_0)
508 ; CHECK-NEXT: fld fa5, %lo(.LCPI23_0)(a1)
509 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
510 ; CHECK-NEXT: vfabs.v v9, v8
511 ; CHECK-NEXT: vmflt.vf v0, v9, fa5
512 ; CHECK-NEXT: fsrmi a0, 3
513 ; CHECK-NEXT: vfcvt.x.f.v v9, v8, v0.t
514 ; CHECK-NEXT: fsrm a0
515 ; CHECK-NEXT: vfcvt.f.x.v v9, v9, v0.t
516 ; CHECK-NEXT: vsetvli zero, zero, e64, m1, ta, mu
517 ; CHECK-NEXT: vfsgnj.vv v8, v9, v8, v0.t
519 %v = call <vscale x 1 x double> @llvm.vp.ceil.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x i1> splat (i1 true), i32 %evl)
520 ret <vscale x 1 x double> %v
523 declare <vscale x 2 x double> @llvm.vp.ceil.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, i32)
525 define <vscale x 2 x double> @vp_ceil_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x i1> %m, i32 zeroext %evl) {
526 ; CHECK-LABEL: vp_ceil_vv_nxv2f64:
528 ; CHECK-NEXT: lui a1, %hi(.LCPI24_0)
529 ; CHECK-NEXT: fld fa5, %lo(.LCPI24_0)(a1)
530 ; CHECK-NEXT: vmv1r.v v10, v0
531 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
532 ; CHECK-NEXT: vfabs.v v12, v8, v0.t
533 ; CHECK-NEXT: vsetvli zero, zero, e64, m2, ta, mu
534 ; CHECK-NEXT: vmflt.vf v10, v12, fa5, v0.t
535 ; CHECK-NEXT: fsrmi a0, 3
536 ; CHECK-NEXT: vmv1r.v v0, v10
537 ; CHECK-NEXT: vsetvli zero, zero, e64, m2, ta, ma
538 ; CHECK-NEXT: vfcvt.x.f.v v12, v8, v0.t
539 ; CHECK-NEXT: fsrm a0
540 ; CHECK-NEXT: vfcvt.f.x.v v12, v12, v0.t
541 ; CHECK-NEXT: vsetvli zero, zero, e64, m2, ta, mu
542 ; CHECK-NEXT: vfsgnj.vv v8, v12, v8, v0.t
544 %v = call <vscale x 2 x double> @llvm.vp.ceil.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x i1> %m, i32 %evl)
545 ret <vscale x 2 x double> %v
548 define <vscale x 2 x double> @vp_ceil_vv_nxv2f64_unmasked(<vscale x 2 x double> %va, i32 zeroext %evl) {
549 ; CHECK-LABEL: vp_ceil_vv_nxv2f64_unmasked:
551 ; CHECK-NEXT: lui a1, %hi(.LCPI25_0)
552 ; CHECK-NEXT: fld fa5, %lo(.LCPI25_0)(a1)
553 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
554 ; CHECK-NEXT: vfabs.v v10, v8
555 ; CHECK-NEXT: vmflt.vf v0, v10, fa5
556 ; CHECK-NEXT: fsrmi a0, 3
557 ; CHECK-NEXT: vfcvt.x.f.v v10, v8, v0.t
558 ; CHECK-NEXT: fsrm a0
559 ; CHECK-NEXT: vfcvt.f.x.v v10, v10, v0.t
560 ; CHECK-NEXT: vsetvli zero, zero, e64, m2, ta, mu
561 ; CHECK-NEXT: vfsgnj.vv v8, v10, v8, v0.t
563 %v = call <vscale x 2 x double> @llvm.vp.ceil.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x i1> splat (i1 true), i32 %evl)
564 ret <vscale x 2 x double> %v
567 declare <vscale x 4 x double> @llvm.vp.ceil.nxv4f64(<vscale x 4 x double>, <vscale x 4 x i1>, i32)
569 define <vscale x 4 x double> @vp_ceil_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x i1> %m, i32 zeroext %evl) {
570 ; CHECK-LABEL: vp_ceil_vv_nxv4f64:
572 ; CHECK-NEXT: lui a1, %hi(.LCPI26_0)
573 ; CHECK-NEXT: fld fa5, %lo(.LCPI26_0)(a1)
574 ; CHECK-NEXT: vmv1r.v v12, v0
575 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
576 ; CHECK-NEXT: vfabs.v v16, v8, v0.t
577 ; CHECK-NEXT: vsetvli zero, zero, e64, m4, ta, mu
578 ; CHECK-NEXT: vmflt.vf v12, v16, fa5, v0.t
579 ; CHECK-NEXT: fsrmi a0, 3
580 ; CHECK-NEXT: vmv1r.v v0, v12
581 ; CHECK-NEXT: vsetvli zero, zero, e64, m4, ta, ma
582 ; CHECK-NEXT: vfcvt.x.f.v v16, v8, v0.t
583 ; CHECK-NEXT: fsrm a0
584 ; CHECK-NEXT: vfcvt.f.x.v v16, v16, v0.t
585 ; CHECK-NEXT: vsetvli zero, zero, e64, m4, ta, mu
586 ; CHECK-NEXT: vfsgnj.vv v8, v16, v8, v0.t
588 %v = call <vscale x 4 x double> @llvm.vp.ceil.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x i1> %m, i32 %evl)
589 ret <vscale x 4 x double> %v
592 define <vscale x 4 x double> @vp_ceil_vv_nxv4f64_unmasked(<vscale x 4 x double> %va, i32 zeroext %evl) {
593 ; CHECK-LABEL: vp_ceil_vv_nxv4f64_unmasked:
595 ; CHECK-NEXT: lui a1, %hi(.LCPI27_0)
596 ; CHECK-NEXT: fld fa5, %lo(.LCPI27_0)(a1)
597 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
598 ; CHECK-NEXT: vfabs.v v12, v8
599 ; CHECK-NEXT: vmflt.vf v0, v12, fa5
600 ; CHECK-NEXT: fsrmi a0, 3
601 ; CHECK-NEXT: vfcvt.x.f.v v12, v8, v0.t
602 ; CHECK-NEXT: fsrm a0
603 ; CHECK-NEXT: vfcvt.f.x.v v12, v12, v0.t
604 ; CHECK-NEXT: vsetvli zero, zero, e64, m4, ta, mu
605 ; CHECK-NEXT: vfsgnj.vv v8, v12, v8, v0.t
607 %v = call <vscale x 4 x double> @llvm.vp.ceil.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x i1> splat (i1 true), i32 %evl)
608 ret <vscale x 4 x double> %v
611 declare <vscale x 7 x double> @llvm.vp.ceil.nxv7f64(<vscale x 7 x double>, <vscale x 7 x i1>, i32)
613 define <vscale x 7 x double> @vp_ceil_vv_nxv7f64(<vscale x 7 x double> %va, <vscale x 7 x i1> %m, i32 zeroext %evl) {
614 ; CHECK-LABEL: vp_ceil_vv_nxv7f64:
616 ; CHECK-NEXT: lui a1, %hi(.LCPI28_0)
617 ; CHECK-NEXT: fld fa5, %lo(.LCPI28_0)(a1)
618 ; CHECK-NEXT: vmv1r.v v16, v0
619 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
620 ; CHECK-NEXT: vfabs.v v24, v8, v0.t
621 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
622 ; CHECK-NEXT: vmflt.vf v16, v24, fa5, v0.t
623 ; CHECK-NEXT: fsrmi a0, 3
624 ; CHECK-NEXT: vmv1r.v v0, v16
625 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, ma
626 ; CHECK-NEXT: vfcvt.x.f.v v24, v8, v0.t
627 ; CHECK-NEXT: fsrm a0
628 ; CHECK-NEXT: vfcvt.f.x.v v24, v24, v0.t
629 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
630 ; CHECK-NEXT: vfsgnj.vv v8, v24, v8, v0.t
632 %v = call <vscale x 7 x double> @llvm.vp.ceil.nxv7f64(<vscale x 7 x double> %va, <vscale x 7 x i1> %m, i32 %evl)
633 ret <vscale x 7 x double> %v
636 define <vscale x 7 x double> @vp_ceil_vv_nxv7f64_unmasked(<vscale x 7 x double> %va, i32 zeroext %evl) {
637 ; CHECK-LABEL: vp_ceil_vv_nxv7f64_unmasked:
639 ; CHECK-NEXT: lui a1, %hi(.LCPI29_0)
640 ; CHECK-NEXT: fld fa5, %lo(.LCPI29_0)(a1)
641 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
642 ; CHECK-NEXT: vfabs.v v16, v8
643 ; CHECK-NEXT: vmflt.vf v0, v16, fa5
644 ; CHECK-NEXT: fsrmi a0, 3
645 ; CHECK-NEXT: vfcvt.x.f.v v16, v8, v0.t
646 ; CHECK-NEXT: fsrm a0
647 ; CHECK-NEXT: vfcvt.f.x.v v16, v16, v0.t
648 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
649 ; CHECK-NEXT: vfsgnj.vv v8, v16, v8, v0.t
651 %v = call <vscale x 7 x double> @llvm.vp.ceil.nxv7f64(<vscale x 7 x double> %va, <vscale x 7 x i1> splat (i1 true), i32 %evl)
652 ret <vscale x 7 x double> %v
655 declare <vscale x 8 x double> @llvm.vp.ceil.nxv8f64(<vscale x 8 x double>, <vscale x 8 x i1>, i32)
657 define <vscale x 8 x double> @vp_ceil_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
658 ; CHECK-LABEL: vp_ceil_vv_nxv8f64:
660 ; CHECK-NEXT: lui a1, %hi(.LCPI30_0)
661 ; CHECK-NEXT: fld fa5, %lo(.LCPI30_0)(a1)
662 ; CHECK-NEXT: vmv1r.v v16, v0
663 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
664 ; CHECK-NEXT: vfabs.v v24, v8, v0.t
665 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
666 ; CHECK-NEXT: vmflt.vf v16, v24, fa5, v0.t
667 ; CHECK-NEXT: fsrmi a0, 3
668 ; CHECK-NEXT: vmv1r.v v0, v16
669 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, ma
670 ; CHECK-NEXT: vfcvt.x.f.v v24, v8, v0.t
671 ; CHECK-NEXT: fsrm a0
672 ; CHECK-NEXT: vfcvt.f.x.v v24, v24, v0.t
673 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
674 ; CHECK-NEXT: vfsgnj.vv v8, v24, v8, v0.t
676 %v = call <vscale x 8 x double> @llvm.vp.ceil.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x i1> %m, i32 %evl)
677 ret <vscale x 8 x double> %v
680 define <vscale x 8 x double> @vp_ceil_vv_nxv8f64_unmasked(<vscale x 8 x double> %va, i32 zeroext %evl) {
681 ; CHECK-LABEL: vp_ceil_vv_nxv8f64_unmasked:
683 ; CHECK-NEXT: lui a1, %hi(.LCPI31_0)
684 ; CHECK-NEXT: fld fa5, %lo(.LCPI31_0)(a1)
685 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
686 ; CHECK-NEXT: vfabs.v v16, v8
687 ; CHECK-NEXT: vmflt.vf v0, v16, fa5
688 ; CHECK-NEXT: fsrmi a0, 3
689 ; CHECK-NEXT: vfcvt.x.f.v v16, v8, v0.t
690 ; CHECK-NEXT: fsrm a0
691 ; CHECK-NEXT: vfcvt.f.x.v v16, v16, v0.t
692 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
693 ; CHECK-NEXT: vfsgnj.vv v8, v16, v8, v0.t
695 %v = call <vscale x 8 x double> @llvm.vp.ceil.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x i1> splat (i1 true), i32 %evl)
696 ret <vscale x 8 x double> %v
700 declare <vscale x 16 x double> @llvm.vp.ceil.nxv16f64(<vscale x 16 x double>, <vscale x 16 x i1>, i32)
702 define <vscale x 16 x double> @vp_ceil_vv_nxv16f64(<vscale x 16 x double> %va, <vscale x 16 x i1> %m, i32 zeroext %evl) {
703 ; CHECK-LABEL: vp_ceil_vv_nxv16f64:
705 ; CHECK-NEXT: addi sp, sp, -16
706 ; CHECK-NEXT: .cfi_def_cfa_offset 16
707 ; CHECK-NEXT: csrr a1, vlenb
708 ; CHECK-NEXT: slli a1, a1, 3
709 ; CHECK-NEXT: sub sp, sp, a1
710 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
711 ; CHECK-NEXT: vmv1r.v v7, v0
712 ; CHECK-NEXT: csrr a1, vlenb
713 ; CHECK-NEXT: srli a2, a1, 3
714 ; CHECK-NEXT: vsetvli a3, zero, e8, mf4, ta, ma
715 ; CHECK-NEXT: vslidedown.vx v6, v0, a2
716 ; CHECK-NEXT: sub a2, a0, a1
717 ; CHECK-NEXT: lui a3, %hi(.LCPI32_0)
718 ; CHECK-NEXT: fld fa5, %lo(.LCPI32_0)(a3)
719 ; CHECK-NEXT: sltu a3, a0, a2
720 ; CHECK-NEXT: addi a3, a3, -1
721 ; CHECK-NEXT: and a2, a3, a2
722 ; CHECK-NEXT: vmv1r.v v0, v6
723 ; CHECK-NEXT: vsetvli zero, a2, e64, m8, ta, ma
724 ; CHECK-NEXT: vfabs.v v24, v16, v0.t
725 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
726 ; CHECK-NEXT: vmflt.vf v6, v24, fa5, v0.t
727 ; CHECK-NEXT: fsrmi a2, 3
728 ; CHECK-NEXT: vmv1r.v v0, v6
729 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, ma
730 ; CHECK-NEXT: vfcvt.x.f.v v24, v16, v0.t
731 ; CHECK-NEXT: addi a3, sp, 16
732 ; CHECK-NEXT: vs8r.v v24, (a3) # Unknown-size Folded Spill
733 ; CHECK-NEXT: fsrm a2
734 ; CHECK-NEXT: addi a2, sp, 16
735 ; CHECK-NEXT: vl8r.v v24, (a2) # Unknown-size Folded Reload
736 ; CHECK-NEXT: vfcvt.f.x.v v24, v24, v0.t
737 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
738 ; CHECK-NEXT: vfsgnj.vv v16, v24, v16, v0.t
739 ; CHECK-NEXT: bltu a0, a1, .LBB32_2
740 ; CHECK-NEXT: # %bb.1:
741 ; CHECK-NEXT: mv a0, a1
742 ; CHECK-NEXT: .LBB32_2:
743 ; CHECK-NEXT: vmv1r.v v0, v7
744 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
745 ; CHECK-NEXT: vfabs.v v24, v8, v0.t
746 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
747 ; CHECK-NEXT: vmflt.vf v7, v24, fa5, v0.t
748 ; CHECK-NEXT: fsrmi a0, 3
749 ; CHECK-NEXT: vmv1r.v v0, v7
750 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, ma
751 ; CHECK-NEXT: vfcvt.x.f.v v24, v8, v0.t
752 ; CHECK-NEXT: fsrm a0
753 ; CHECK-NEXT: vfcvt.f.x.v v24, v24, v0.t
754 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
755 ; CHECK-NEXT: vfsgnj.vv v8, v24, v8, v0.t
756 ; CHECK-NEXT: csrr a0, vlenb
757 ; CHECK-NEXT: slli a0, a0, 3
758 ; CHECK-NEXT: add sp, sp, a0
759 ; CHECK-NEXT: addi sp, sp, 16
761 %v = call <vscale x 16 x double> @llvm.vp.ceil.nxv16f64(<vscale x 16 x double> %va, <vscale x 16 x i1> %m, i32 %evl)
762 ret <vscale x 16 x double> %v
765 define <vscale x 16 x double> @vp_ceil_vv_nxv16f64_unmasked(<vscale x 16 x double> %va, i32 zeroext %evl) {
766 ; CHECK-LABEL: vp_ceil_vv_nxv16f64_unmasked:
768 ; CHECK-NEXT: csrr a1, vlenb
769 ; CHECK-NEXT: sub a2, a0, a1
770 ; CHECK-NEXT: lui a3, %hi(.LCPI33_0)
771 ; CHECK-NEXT: fld fa5, %lo(.LCPI33_0)(a3)
772 ; CHECK-NEXT: sltu a3, a0, a2
773 ; CHECK-NEXT: addi a3, a3, -1
774 ; CHECK-NEXT: and a2, a3, a2
775 ; CHECK-NEXT: vsetvli zero, a2, e64, m8, ta, ma
776 ; CHECK-NEXT: vfabs.v v24, v16
777 ; CHECK-NEXT: vmflt.vf v0, v24, fa5
778 ; CHECK-NEXT: fsrmi a2, 3
779 ; CHECK-NEXT: vfcvt.x.f.v v24, v16, v0.t
780 ; CHECK-NEXT: fsrm a2
781 ; CHECK-NEXT: vfcvt.f.x.v v24, v24, v0.t
782 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
783 ; CHECK-NEXT: vfsgnj.vv v16, v24, v16, v0.t
784 ; CHECK-NEXT: bltu a0, a1, .LBB33_2
785 ; CHECK-NEXT: # %bb.1:
786 ; CHECK-NEXT: mv a0, a1
787 ; CHECK-NEXT: .LBB33_2:
788 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
789 ; CHECK-NEXT: vfabs.v v24, v8
790 ; CHECK-NEXT: vmflt.vf v0, v24, fa5
791 ; CHECK-NEXT: fsrmi a0, 3
792 ; CHECK-NEXT: vfcvt.x.f.v v24, v8, v0.t
793 ; CHECK-NEXT: fsrm a0
794 ; CHECK-NEXT: vfcvt.f.x.v v24, v24, v0.t
795 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, mu
796 ; CHECK-NEXT: vfsgnj.vv v8, v24, v8, v0.t
798 %v = call <vscale x 16 x double> @llvm.vp.ceil.nxv16f64(<vscale x 16 x double> %va, <vscale x 16 x i1> splat (i1 true), i32 %evl)
799 ret <vscale x 16 x double> %v