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 --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
6 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 declare <2 x half> @llvm.vp.minnum.v2f16(<2 x half>, <2 x half>, <2 x i1>, i32)
13 define <2 x half> @vfmin_vv_v2f16(<2 x half> %va, <2 x half> %vb, <2 x i1> %m, i32 zeroext %evl) {
14 ; ZVFH-LABEL: vfmin_vv_v2f16:
16 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
17 ; ZVFH-NEXT: vfmin.vv v8, v8, v9, v0.t
20 ; ZVFHMIN-LABEL: vfmin_vv_v2f16:
22 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
23 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
24 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
25 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
26 ; ZVFHMIN-NEXT: vfmin.vv v9, v9, v10, v0.t
27 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
28 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
30 %v = call <2 x half> @llvm.vp.minnum.v2f16(<2 x half> %va, <2 x half> %vb, <2 x i1> %m, i32 %evl)
34 define <2 x half> @vfmin_vv_v2f16_unmasked(<2 x half> %va, <2 x half> %vb, i32 zeroext %evl) {
35 ; ZVFH-LABEL: vfmin_vv_v2f16_unmasked:
37 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
38 ; ZVFH-NEXT: vfmin.vv v8, v8, v9
41 ; ZVFHMIN-LABEL: vfmin_vv_v2f16_unmasked:
43 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
44 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
45 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
46 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
47 ; ZVFHMIN-NEXT: vfmin.vv v9, v9, v10
48 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
49 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
51 %v = call <2 x half> @llvm.vp.minnum.v2f16(<2 x half> %va, <2 x half> %vb, <2 x i1> splat (i1 true), i32 %evl)
55 declare <4 x half> @llvm.vp.minnum.v4f16(<4 x half>, <4 x half>, <4 x i1>, i32)
57 define <4 x half> @vfmin_vv_v4f16(<4 x half> %va, <4 x half> %vb, <4 x i1> %m, i32 zeroext %evl) {
58 ; ZVFH-LABEL: vfmin_vv_v4f16:
60 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
61 ; ZVFH-NEXT: vfmin.vv v8, v8, v9, v0.t
64 ; ZVFHMIN-LABEL: vfmin_vv_v4f16:
66 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
67 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
68 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
69 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
70 ; ZVFHMIN-NEXT: vfmin.vv v9, v9, v10, v0.t
71 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
72 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
74 %v = call <4 x half> @llvm.vp.minnum.v4f16(<4 x half> %va, <4 x half> %vb, <4 x i1> %m, i32 %evl)
78 define <4 x half> @vfmin_vv_v4f16_unmasked(<4 x half> %va, <4 x half> %vb, i32 zeroext %evl) {
79 ; ZVFH-LABEL: vfmin_vv_v4f16_unmasked:
81 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
82 ; ZVFH-NEXT: vfmin.vv v8, v8, v9
85 ; ZVFHMIN-LABEL: vfmin_vv_v4f16_unmasked:
87 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
88 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
89 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
90 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
91 ; ZVFHMIN-NEXT: vfmin.vv v9, v9, v10
92 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
93 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
95 %v = call <4 x half> @llvm.vp.minnum.v4f16(<4 x half> %va, <4 x half> %vb, <4 x i1> splat (i1 true), i32 %evl)
99 declare <8 x half> @llvm.vp.minnum.v8f16(<8 x half>, <8 x half>, <8 x i1>, i32)
101 define <8 x half> @vfmin_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
102 ; ZVFH-LABEL: vfmin_vv_v8f16:
104 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
105 ; ZVFH-NEXT: vfmin.vv v8, v8, v9, v0.t
108 ; ZVFHMIN-LABEL: vfmin_vv_v8f16:
110 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
111 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
112 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
113 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
114 ; ZVFHMIN-NEXT: vfmin.vv v10, v12, v10, v0.t
115 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
116 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
118 %v = call <8 x half> @llvm.vp.minnum.v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 %evl)
122 define <8 x half> @vfmin_vv_v8f16_unmasked(<8 x half> %va, <8 x half> %vb, i32 zeroext %evl) {
123 ; ZVFH-LABEL: vfmin_vv_v8f16_unmasked:
125 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
126 ; ZVFH-NEXT: vfmin.vv v8, v8, v9
129 ; ZVFHMIN-LABEL: vfmin_vv_v8f16_unmasked:
131 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
132 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
133 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
134 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
135 ; ZVFHMIN-NEXT: vfmin.vv v10, v12, v10
136 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
137 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
139 %v = call <8 x half> @llvm.vp.minnum.v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> splat (i1 true), i32 %evl)
143 declare <16 x half> @llvm.vp.minnum.v16f16(<16 x half>, <16 x half>, <16 x i1>, i32)
145 define <16 x half> @vfmin_vv_v16f16(<16 x half> %va, <16 x half> %vb, <16 x i1> %m, i32 zeroext %evl) {
146 ; ZVFH-LABEL: vfmin_vv_v16f16:
148 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
149 ; ZVFH-NEXT: vfmin.vv v8, v8, v10, v0.t
152 ; ZVFHMIN-LABEL: vfmin_vv_v16f16:
154 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
155 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
156 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
157 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
158 ; ZVFHMIN-NEXT: vfmin.vv v12, v16, v12, v0.t
159 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
160 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
162 %v = call <16 x half> @llvm.vp.minnum.v16f16(<16 x half> %va, <16 x half> %vb, <16 x i1> %m, i32 %evl)
166 define <16 x half> @vfmin_vv_v16f16_unmasked(<16 x half> %va, <16 x half> %vb, i32 zeroext %evl) {
167 ; ZVFH-LABEL: vfmin_vv_v16f16_unmasked:
169 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
170 ; ZVFH-NEXT: vfmin.vv v8, v8, v10
173 ; ZVFHMIN-LABEL: vfmin_vv_v16f16_unmasked:
175 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
176 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
177 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
178 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
179 ; ZVFHMIN-NEXT: vfmin.vv v12, v16, v12
180 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
181 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
183 %v = call <16 x half> @llvm.vp.minnum.v16f16(<16 x half> %va, <16 x half> %vb, <16 x i1> splat (i1 true), i32 %evl)
187 declare <2 x float> @llvm.vp.minnum.v2f32(<2 x float>, <2 x float>, <2 x i1>, i32)
189 define <2 x float> @vfmin_vv_v2f32(<2 x float> %va, <2 x float> %vb, <2 x i1> %m, i32 zeroext %evl) {
190 ; CHECK-LABEL: vfmin_vv_v2f32:
192 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
193 ; CHECK-NEXT: vfmin.vv v8, v8, v9, v0.t
195 %v = call <2 x float> @llvm.vp.minnum.v2f32(<2 x float> %va, <2 x float> %vb, <2 x i1> %m, i32 %evl)
199 define <2 x float> @vfmin_vv_v2f32_unmasked(<2 x float> %va, <2 x float> %vb, i32 zeroext %evl) {
200 ; CHECK-LABEL: vfmin_vv_v2f32_unmasked:
202 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
203 ; CHECK-NEXT: vfmin.vv v8, v8, v9
205 %v = call <2 x float> @llvm.vp.minnum.v2f32(<2 x float> %va, <2 x float> %vb, <2 x i1> splat (i1 true), i32 %evl)
209 declare <4 x float> @llvm.vp.minnum.v4f32(<4 x float>, <4 x float>, <4 x i1>, i32)
211 define <4 x float> @vfmin_vv_v4f32(<4 x float> %va, <4 x float> %vb, <4 x i1> %m, i32 zeroext %evl) {
212 ; CHECK-LABEL: vfmin_vv_v4f32:
214 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
215 ; CHECK-NEXT: vfmin.vv v8, v8, v9, v0.t
217 %v = call <4 x float> @llvm.vp.minnum.v4f32(<4 x float> %va, <4 x float> %vb, <4 x i1> %m, i32 %evl)
221 define <4 x float> @vfmin_vv_v4f32_unmasked(<4 x float> %va, <4 x float> %vb, i32 zeroext %evl) {
222 ; CHECK-LABEL: vfmin_vv_v4f32_unmasked:
224 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
225 ; CHECK-NEXT: vfmin.vv v8, v8, v9
227 %v = call <4 x float> @llvm.vp.minnum.v4f32(<4 x float> %va, <4 x float> %vb, <4 x i1> splat (i1 true), i32 %evl)
231 declare <8 x float> @llvm.vp.minnum.v8f32(<8 x float>, <8 x float>, <8 x i1>, i32)
233 define <8 x float> @vfmin_vv_v8f32(<8 x float> %va, <8 x float> %vb, <8 x i1> %m, i32 zeroext %evl) {
234 ; CHECK-LABEL: vfmin_vv_v8f32:
236 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
237 ; CHECK-NEXT: vfmin.vv v8, v8, v10, v0.t
239 %v = call <8 x float> @llvm.vp.minnum.v8f32(<8 x float> %va, <8 x float> %vb, <8 x i1> %m, i32 %evl)
243 define <8 x float> @vfmin_vv_v8f32_unmasked(<8 x float> %va, <8 x float> %vb, i32 zeroext %evl) {
244 ; CHECK-LABEL: vfmin_vv_v8f32_unmasked:
246 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
247 ; CHECK-NEXT: vfmin.vv v8, v8, v10
249 %v = call <8 x float> @llvm.vp.minnum.v8f32(<8 x float> %va, <8 x float> %vb, <8 x i1> splat (i1 true), i32 %evl)
253 declare <16 x float> @llvm.vp.minnum.v16f32(<16 x float>, <16 x float>, <16 x i1>, i32)
255 define <16 x float> @vfmin_vv_v16f32(<16 x float> %va, <16 x float> %vb, <16 x i1> %m, i32 zeroext %evl) {
256 ; CHECK-LABEL: vfmin_vv_v16f32:
258 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
259 ; CHECK-NEXT: vfmin.vv v8, v8, v12, v0.t
261 %v = call <16 x float> @llvm.vp.minnum.v16f32(<16 x float> %va, <16 x float> %vb, <16 x i1> %m, i32 %evl)
265 define <16 x float> @vfmin_vv_v16f32_unmasked(<16 x float> %va, <16 x float> %vb, i32 zeroext %evl) {
266 ; CHECK-LABEL: vfmin_vv_v16f32_unmasked:
268 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
269 ; CHECK-NEXT: vfmin.vv v8, v8, v12
271 %v = call <16 x float> @llvm.vp.minnum.v16f32(<16 x float> %va, <16 x float> %vb, <16 x i1> splat (i1 true), i32 %evl)
275 declare <2 x double> @llvm.vp.minnum.v2f64(<2 x double>, <2 x double>, <2 x i1>, i32)
277 define <2 x double> @vfmin_vv_v2f64(<2 x double> %va, <2 x double> %vb, <2 x i1> %m, i32 zeroext %evl) {
278 ; CHECK-LABEL: vfmin_vv_v2f64:
280 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
281 ; CHECK-NEXT: vfmin.vv v8, v8, v9, v0.t
283 %v = call <2 x double> @llvm.vp.minnum.v2f64(<2 x double> %va, <2 x double> %vb, <2 x i1> %m, i32 %evl)
287 define <2 x double> @vfmin_vv_v2f64_unmasked(<2 x double> %va, <2 x double> %vb, i32 zeroext %evl) {
288 ; CHECK-LABEL: vfmin_vv_v2f64_unmasked:
290 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
291 ; CHECK-NEXT: vfmin.vv v8, v8, v9
293 %v = call <2 x double> @llvm.vp.minnum.v2f64(<2 x double> %va, <2 x double> %vb, <2 x i1> splat (i1 true), i32 %evl)
297 declare <4 x double> @llvm.vp.minnum.v4f64(<4 x double>, <4 x double>, <4 x i1>, i32)
299 define <4 x double> @vfmin_vv_v4f64(<4 x double> %va, <4 x double> %vb, <4 x i1> %m, i32 zeroext %evl) {
300 ; CHECK-LABEL: vfmin_vv_v4f64:
302 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
303 ; CHECK-NEXT: vfmin.vv v8, v8, v10, v0.t
305 %v = call <4 x double> @llvm.vp.minnum.v4f64(<4 x double> %va, <4 x double> %vb, <4 x i1> %m, i32 %evl)
309 define <4 x double> @vfmin_vv_v4f64_unmasked(<4 x double> %va, <4 x double> %vb, i32 zeroext %evl) {
310 ; CHECK-LABEL: vfmin_vv_v4f64_unmasked:
312 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
313 ; CHECK-NEXT: vfmin.vv v8, v8, v10
315 %v = call <4 x double> @llvm.vp.minnum.v4f64(<4 x double> %va, <4 x double> %vb, <4 x i1> splat (i1 true), i32 %evl)
319 declare <8 x double> @llvm.vp.minnum.v8f64(<8 x double>, <8 x double>, <8 x i1>, i32)
321 define <8 x double> @vfmin_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
322 ; CHECK-LABEL: vfmin_vv_v8f64:
324 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
325 ; CHECK-NEXT: vfmin.vv v8, v8, v12, v0.t
327 %v = call <8 x double> @llvm.vp.minnum.v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 %evl)
331 define <8 x double> @vfmin_vv_v8f64_unmasked(<8 x double> %va, <8 x double> %vb, i32 zeroext %evl) {
332 ; CHECK-LABEL: vfmin_vv_v8f64_unmasked:
334 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
335 ; CHECK-NEXT: vfmin.vv v8, v8, v12
337 %v = call <8 x double> @llvm.vp.minnum.v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> splat (i1 true), i32 %evl)
341 declare <15 x double> @llvm.vp.minnum.v15f64(<15 x double>, <15 x double>, <15 x i1>, i32)
343 define <15 x double> @vfmin_vv_v15f64(<15 x double> %va, <15 x double> %vb, <15 x i1> %m, i32 zeroext %evl) {
344 ; CHECK-LABEL: vfmin_vv_v15f64:
346 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
347 ; CHECK-NEXT: vfmin.vv v8, v8, v16, v0.t
349 %v = call <15 x double> @llvm.vp.minnum.v15f64(<15 x double> %va, <15 x double> %vb, <15 x i1> %m, i32 %evl)
353 define <15 x double> @vfmin_vv_v15f64_unmasked(<15 x double> %va, <15 x double> %vb, i32 zeroext %evl) {
354 ; CHECK-LABEL: vfmin_vv_v15f64_unmasked:
356 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
357 ; CHECK-NEXT: vfmin.vv v8, v8, v16
359 %v = call <15 x double> @llvm.vp.minnum.v15f64(<15 x double> %va, <15 x double> %vb, <15 x i1> splat (i1 true), i32 %evl)
363 declare <16 x double> @llvm.vp.minnum.v16f64(<16 x double>, <16 x double>, <16 x i1>, i32)
365 define <16 x double> @vfmin_vv_v16f64(<16 x double> %va, <16 x double> %vb, <16 x i1> %m, i32 zeroext %evl) {
366 ; CHECK-LABEL: vfmin_vv_v16f64:
368 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
369 ; CHECK-NEXT: vfmin.vv v8, v8, v16, v0.t
371 %v = call <16 x double> @llvm.vp.minnum.v16f64(<16 x double> %va, <16 x double> %vb, <16 x i1> %m, i32 %evl)
375 define <16 x double> @vfmin_vv_v16f64_unmasked(<16 x double> %va, <16 x double> %vb, i32 zeroext %evl) {
376 ; CHECK-LABEL: vfmin_vv_v16f64_unmasked:
378 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
379 ; CHECK-NEXT: vfmin.vv v8, v8, v16
381 %v = call <16 x double> @llvm.vp.minnum.v16f64(<16 x double> %va, <16 x double> %vb, <16 x i1> splat (i1 true), i32 %evl)
385 declare <32 x double> @llvm.vp.minnum.v32f64(<32 x double>, <32 x double>, <32 x i1>, i32)
387 define <32 x double> @vfmin_vv_v32f64(<32 x double> %va, <32 x double> %vb, <32 x i1> %m, i32 zeroext %evl) {
388 ; CHECK-LABEL: vfmin_vv_v32f64:
390 ; CHECK-NEXT: addi sp, sp, -16
391 ; CHECK-NEXT: .cfi_def_cfa_offset 16
392 ; CHECK-NEXT: csrr a1, vlenb
393 ; CHECK-NEXT: slli a1, a1, 4
394 ; CHECK-NEXT: sub sp, sp, a1
395 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
396 ; CHECK-NEXT: addi a1, a0, 128
397 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
398 ; CHECK-NEXT: vle64.v v24, (a1)
399 ; CHECK-NEXT: csrr a1, vlenb
400 ; CHECK-NEXT: slli a1, a1, 3
401 ; CHECK-NEXT: add a1, sp, a1
402 ; CHECK-NEXT: addi a1, a1, 16
403 ; CHECK-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
404 ; CHECK-NEXT: vle64.v v24, (a0)
405 ; CHECK-NEXT: addi a0, sp, 16
406 ; CHECK-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
407 ; CHECK-NEXT: li a1, 16
408 ; CHECK-NEXT: vsetivli zero, 2, e8, mf4, ta, ma
409 ; CHECK-NEXT: vslidedown.vi v7, v0, 2
410 ; CHECK-NEXT: mv a0, a2
411 ; CHECK-NEXT: bltu a2, a1, .LBB26_2
412 ; CHECK-NEXT: # %bb.1:
413 ; CHECK-NEXT: li a0, 16
414 ; CHECK-NEXT: .LBB26_2:
415 ; CHECK-NEXT: addi a1, sp, 16
416 ; CHECK-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
417 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
418 ; CHECK-NEXT: vfmin.vv v8, v8, v24, v0.t
419 ; CHECK-NEXT: addi a0, a2, -16
420 ; CHECK-NEXT: sltu a1, a2, a0
421 ; CHECK-NEXT: addi a1, a1, -1
422 ; CHECK-NEXT: and a0, a1, a0
423 ; CHECK-NEXT: vmv1r.v v0, v7
424 ; CHECK-NEXT: csrr a1, vlenb
425 ; CHECK-NEXT: slli a1, a1, 3
426 ; CHECK-NEXT: add a1, sp, a1
427 ; CHECK-NEXT: addi a1, a1, 16
428 ; CHECK-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
429 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
430 ; CHECK-NEXT: vfmin.vv v16, v16, v24, v0.t
431 ; CHECK-NEXT: csrr a0, vlenb
432 ; CHECK-NEXT: slli a0, a0, 4
433 ; CHECK-NEXT: add sp, sp, a0
434 ; CHECK-NEXT: addi sp, sp, 16
436 %v = call <32 x double> @llvm.vp.minnum.v32f64(<32 x double> %va, <32 x double> %vb, <32 x i1> %m, i32 %evl)
440 define <32 x double> @vfmin_vv_v32f64_unmasked(<32 x double> %va, <32 x double> %vb, i32 zeroext %evl) {
441 ; CHECK-LABEL: vfmin_vv_v32f64_unmasked:
443 ; CHECK-NEXT: addi a1, a0, 128
444 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
445 ; CHECK-NEXT: vle64.v v24, (a1)
446 ; CHECK-NEXT: vle64.v v0, (a0)
447 ; CHECK-NEXT: li a1, 16
448 ; CHECK-NEXT: mv a0, a2
449 ; CHECK-NEXT: bltu a2, a1, .LBB27_2
450 ; CHECK-NEXT: # %bb.1:
451 ; CHECK-NEXT: li a0, 16
452 ; CHECK-NEXT: .LBB27_2:
453 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
454 ; CHECK-NEXT: vfmin.vv v8, v8, v0
455 ; CHECK-NEXT: addi a0, a2, -16
456 ; CHECK-NEXT: sltu a1, a2, a0
457 ; CHECK-NEXT: addi a1, a1, -1
458 ; CHECK-NEXT: and a0, a1, a0
459 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
460 ; CHECK-NEXT: vfmin.vv v16, v16, v24
462 %v = call <32 x double> @llvm.vp.minnum.v32f64(<32 x double> %va, <32 x double> %vb, <32 x i1> splat (i1 true), i32 %evl)