1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zvfh,+zfbfmin,+zvfbfmin,+v \
3 ; RUN: -target-abi=ilp32d -verify-machineinstrs < %s | FileCheck %s \
4 ; RUN: --check-prefixes=CHECK,ZVFH
5 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zvfh,+zfbfmin,+zvfbfmin,+v \
6 ; RUN: -target-abi=lp64d -verify-machineinstrs < %s | FileCheck %s \
7 ; RUN: --check-prefixes=CHECK,ZVFH
8 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfhmin,+zvfhmin,+zfbfmin,+zvfbfmin,+v \
9 ; RUN: -target-abi=ilp32d -verify-machineinstrs < %s | FileCheck %s \
10 ; RUN: --check-prefixes=CHECK,ZVFHMIN
11 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfhmin,+zvfhmin,+zfbfmin,+zvfbfmin,+v \
12 ; RUN: -target-abi=lp64d -verify-machineinstrs < %s | FileCheck %s \
13 ; RUN: --check-prefixes=CHECK,ZVFHMIN
15 declare <vscale x 1 x bfloat> @llvm.vp.minnum.nxv1bf16(<vscale x 1 x bfloat>, <vscale x 1 x bfloat>, <vscale x 1 x i1>, i32)
17 define <vscale x 1 x bfloat> @vfmin_vv_nxv1bf16(<vscale x 1 x bfloat> %va, <vscale x 1 x bfloat> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
18 ; CHECK-LABEL: vfmin_vv_nxv1bf16:
20 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
21 ; CHECK-NEXT: vfwcvtbf16.f.f.v v10, v9
22 ; CHECK-NEXT: vfwcvtbf16.f.f.v v9, v8
23 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
24 ; CHECK-NEXT: vfmin.vv v9, v9, v10, v0.t
25 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
26 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v9
28 %v = call <vscale x 1 x bfloat> @llvm.vp.minnum.nxv1bf16(<vscale x 1 x bfloat> %va, <vscale x 1 x bfloat> %vb, <vscale x 1 x i1> %m, i32 %evl)
29 ret <vscale x 1 x bfloat> %v
32 define <vscale x 1 x bfloat> @vfmin_vv_nxv1bf16_unmasked(<vscale x 1 x bfloat> %va, <vscale x 1 x bfloat> %vb, i32 zeroext %evl) {
33 ; CHECK-LABEL: vfmin_vv_nxv1bf16_unmasked:
35 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
36 ; CHECK-NEXT: vfwcvtbf16.f.f.v v10, v9
37 ; CHECK-NEXT: vfwcvtbf16.f.f.v v9, v8
38 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
39 ; CHECK-NEXT: vfmin.vv v9, v9, v10
40 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
41 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v9
43 %v = call <vscale x 1 x bfloat> @llvm.vp.minnum.nxv1bf16(<vscale x 1 x bfloat> %va, <vscale x 1 x bfloat> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
44 ret <vscale x 1 x bfloat> %v
47 declare <vscale x 2 x bfloat> @llvm.vp.minnum.nxv2bf16(<vscale x 2 x bfloat>, <vscale x 2 x bfloat>, <vscale x 2 x i1>, i32)
49 define <vscale x 2 x bfloat> @vfmin_vv_nxv2bf16(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, <vscale x 2 x i1> %m, i32 zeroext %evl) {
50 ; CHECK-LABEL: vfmin_vv_nxv2bf16:
52 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
53 ; CHECK-NEXT: vfwcvtbf16.f.f.v v10, v9
54 ; CHECK-NEXT: vfwcvtbf16.f.f.v v9, v8
55 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
56 ; CHECK-NEXT: vfmin.vv v9, v9, v10, v0.t
57 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
58 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v9
60 %v = call <vscale x 2 x bfloat> @llvm.vp.minnum.nxv2bf16(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, <vscale x 2 x i1> %m, i32 %evl)
61 ret <vscale x 2 x bfloat> %v
64 define <vscale x 2 x bfloat> @vfmin_vv_nxv2bf16_unmasked(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, i32 zeroext %evl) {
65 ; CHECK-LABEL: vfmin_vv_nxv2bf16_unmasked:
67 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
68 ; CHECK-NEXT: vfwcvtbf16.f.f.v v10, v9
69 ; CHECK-NEXT: vfwcvtbf16.f.f.v v9, v8
70 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
71 ; CHECK-NEXT: vfmin.vv v9, v9, v10
72 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
73 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v9
75 %v = call <vscale x 2 x bfloat> @llvm.vp.minnum.nxv2bf16(<vscale x 2 x bfloat> %va, <vscale x 2 x bfloat> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
76 ret <vscale x 2 x bfloat> %v
79 declare <vscale x 4 x bfloat> @llvm.vp.minnum.nxv4bf16(<vscale x 4 x bfloat>, <vscale x 4 x bfloat>, <vscale x 4 x i1>, i32)
81 define <vscale x 4 x bfloat> @vfmin_vv_nxv4bf16(<vscale x 4 x bfloat> %va, <vscale x 4 x bfloat> %vb, <vscale x 4 x i1> %m, i32 zeroext %evl) {
82 ; CHECK-LABEL: vfmin_vv_nxv4bf16:
84 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
85 ; CHECK-NEXT: vfwcvtbf16.f.f.v v10, v9
86 ; CHECK-NEXT: vfwcvtbf16.f.f.v v12, v8
87 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
88 ; CHECK-NEXT: vfmin.vv v10, v12, v10, v0.t
89 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
90 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v10
92 %v = call <vscale x 4 x bfloat> @llvm.vp.minnum.nxv4bf16(<vscale x 4 x bfloat> %va, <vscale x 4 x bfloat> %vb, <vscale x 4 x i1> %m, i32 %evl)
93 ret <vscale x 4 x bfloat> %v
96 define <vscale x 4 x bfloat> @vfmin_vv_nxv4bf16_unmasked(<vscale x 4 x bfloat> %va, <vscale x 4 x bfloat> %vb, i32 zeroext %evl) {
97 ; CHECK-LABEL: vfmin_vv_nxv4bf16_unmasked:
99 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
100 ; CHECK-NEXT: vfwcvtbf16.f.f.v v10, v9
101 ; CHECK-NEXT: vfwcvtbf16.f.f.v v12, v8
102 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
103 ; CHECK-NEXT: vfmin.vv v10, v12, v10
104 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
105 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v10
107 %v = call <vscale x 4 x bfloat> @llvm.vp.minnum.nxv4bf16(<vscale x 4 x bfloat> %va, <vscale x 4 x bfloat> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
108 ret <vscale x 4 x bfloat> %v
111 declare <vscale x 8 x bfloat> @llvm.vp.minnum.nxv8bf16(<vscale x 8 x bfloat>, <vscale x 8 x bfloat>, <vscale x 8 x i1>, i32)
113 define <vscale x 8 x bfloat> @vfmin_vv_nxv8bf16(<vscale x 8 x bfloat> %va, <vscale x 8 x bfloat> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
114 ; CHECK-LABEL: vfmin_vv_nxv8bf16:
116 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
117 ; CHECK-NEXT: vfwcvtbf16.f.f.v v12, v10
118 ; CHECK-NEXT: vfwcvtbf16.f.f.v v16, v8
119 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
120 ; CHECK-NEXT: vfmin.vv v12, v16, v12, v0.t
121 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
122 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v12
124 %v = call <vscale x 8 x bfloat> @llvm.vp.minnum.nxv8bf16(<vscale x 8 x bfloat> %va, <vscale x 8 x bfloat> %vb, <vscale x 8 x i1> %m, i32 %evl)
125 ret <vscale x 8 x bfloat> %v
128 define <vscale x 8 x bfloat> @vfmin_vv_nxv8bf16_unmasked(<vscale x 8 x bfloat> %va, <vscale x 8 x bfloat> %vb, i32 zeroext %evl) {
129 ; CHECK-LABEL: vfmin_vv_nxv8bf16_unmasked:
131 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
132 ; CHECK-NEXT: vfwcvtbf16.f.f.v v12, v10
133 ; CHECK-NEXT: vfwcvtbf16.f.f.v v16, v8
134 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
135 ; CHECK-NEXT: vfmin.vv v12, v16, v12
136 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
137 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v12
139 %v = call <vscale x 8 x bfloat> @llvm.vp.minnum.nxv8bf16(<vscale x 8 x bfloat> %va, <vscale x 8 x bfloat> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
140 ret <vscale x 8 x bfloat> %v
143 declare <vscale x 16 x bfloat> @llvm.vp.minnum.nxv16bf16(<vscale x 16 x bfloat>, <vscale x 16 x bfloat>, <vscale x 16 x i1>, i32)
145 define <vscale x 16 x bfloat> @vfmin_vv_nxv16bf16(<vscale x 16 x bfloat> %va, <vscale x 16 x bfloat> %vb, <vscale x 16 x i1> %m, i32 zeroext %evl) {
146 ; CHECK-LABEL: vfmin_vv_nxv16bf16:
148 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
149 ; CHECK-NEXT: vfwcvtbf16.f.f.v v16, v12
150 ; CHECK-NEXT: vfwcvtbf16.f.f.v v24, v8
151 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
152 ; CHECK-NEXT: vfmin.vv v16, v24, v16, v0.t
153 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
154 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v16
156 %v = call <vscale x 16 x bfloat> @llvm.vp.minnum.nxv16bf16(<vscale x 16 x bfloat> %va, <vscale x 16 x bfloat> %vb, <vscale x 16 x i1> %m, i32 %evl)
157 ret <vscale x 16 x bfloat> %v
160 define <vscale x 16 x bfloat> @vfmin_vv_nxv16bf16_unmasked(<vscale x 16 x bfloat> %va, <vscale x 16 x bfloat> %vb, i32 zeroext %evl) {
161 ; CHECK-LABEL: vfmin_vv_nxv16bf16_unmasked:
163 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
164 ; CHECK-NEXT: vfwcvtbf16.f.f.v v16, v12
165 ; CHECK-NEXT: vfwcvtbf16.f.f.v v24, v8
166 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
167 ; CHECK-NEXT: vfmin.vv v16, v24, v16
168 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
169 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v16
171 %v = call <vscale x 16 x bfloat> @llvm.vp.minnum.nxv16bf16(<vscale x 16 x bfloat> %va, <vscale x 16 x bfloat> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
172 ret <vscale x 16 x bfloat> %v
175 declare <vscale x 32 x bfloat> @llvm.vp.minnum.nxv32bf16(<vscale x 32 x bfloat>, <vscale x 32 x bfloat>, <vscale x 32 x i1>, i32)
177 define <vscale x 32 x bfloat> @vfmin_vv_nxv32bf16(<vscale x 32 x bfloat> %va, <vscale x 32 x bfloat> %vb, <vscale x 32 x i1> %m, i32 zeroext %evl) {
178 ; CHECK-LABEL: vfmin_vv_nxv32bf16:
180 ; CHECK-NEXT: addi sp, sp, -16
181 ; CHECK-NEXT: .cfi_def_cfa_offset 16
182 ; CHECK-NEXT: csrr a1, vlenb
183 ; CHECK-NEXT: slli a1, a1, 3
184 ; CHECK-NEXT: sub sp, sp, a1
185 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
186 ; CHECK-NEXT: vmv1r.v v7, v0
187 ; CHECK-NEXT: csrr a2, vlenb
188 ; CHECK-NEXT: addi a1, sp, 16
189 ; CHECK-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
190 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
191 ; CHECK-NEXT: vfwcvtbf16.f.f.v v24, v20
192 ; CHECK-NEXT: slli a1, a2, 1
193 ; CHECK-NEXT: srli a2, a2, 2
194 ; CHECK-NEXT: sub a3, a0, a1
195 ; CHECK-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
196 ; CHECK-NEXT: vslidedown.vx v0, v0, a2
197 ; CHECK-NEXT: sltu a2, a0, a3
198 ; CHECK-NEXT: addi a2, a2, -1
199 ; CHECK-NEXT: and a2, a2, a3
200 ; CHECK-NEXT: vsetvli a3, zero, e16, m4, ta, ma
201 ; CHECK-NEXT: vfwcvtbf16.f.f.v v16, v12
202 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
203 ; CHECK-NEXT: vfmin.vv v16, v16, v24, v0.t
204 ; CHECK-NEXT: vsetvli a2, zero, e16, m4, ta, ma
205 ; CHECK-NEXT: vfncvtbf16.f.f.w v12, v16
206 ; CHECK-NEXT: bltu a0, a1, .LBB10_2
207 ; CHECK-NEXT: # %bb.1:
208 ; CHECK-NEXT: mv a0, a1
209 ; CHECK-NEXT: .LBB10_2:
210 ; CHECK-NEXT: addi a1, sp, 16
211 ; CHECK-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
212 ; CHECK-NEXT: vfwcvtbf16.f.f.v v16, v24
213 ; CHECK-NEXT: vfwcvtbf16.f.f.v v24, v8
214 ; CHECK-NEXT: vmv1r.v v0, v7
215 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
216 ; CHECK-NEXT: vfmin.vv v16, v24, v16, v0.t
217 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
218 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v16
219 ; CHECK-NEXT: csrr a0, vlenb
220 ; CHECK-NEXT: slli a0, a0, 3
221 ; CHECK-NEXT: add sp, sp, a0
222 ; CHECK-NEXT: .cfi_def_cfa sp, 16
223 ; CHECK-NEXT: addi sp, sp, 16
224 ; CHECK-NEXT: .cfi_def_cfa_offset 0
226 %v = call <vscale x 32 x bfloat> @llvm.vp.minnum.nxv32bf16(<vscale x 32 x bfloat> %va, <vscale x 32 x bfloat> %vb, <vscale x 32 x i1> %m, i32 %evl)
227 ret <vscale x 32 x bfloat> %v
230 define <vscale x 32 x bfloat> @vfmin_vv_nxv32bf16_unmasked(<vscale x 32 x bfloat> %va, <vscale x 32 x bfloat> %vb, i32 zeroext %evl) {
231 ; CHECK-LABEL: vfmin_vv_nxv32bf16_unmasked:
233 ; CHECK-NEXT: addi sp, sp, -16
234 ; CHECK-NEXT: .cfi_def_cfa_offset 16
235 ; CHECK-NEXT: csrr a1, vlenb
236 ; CHECK-NEXT: slli a1, a1, 3
237 ; CHECK-NEXT: sub sp, sp, a1
238 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
239 ; CHECK-NEXT: csrr a2, vlenb
240 ; CHECK-NEXT: vsetvli a1, zero, e8, m4, ta, ma
241 ; CHECK-NEXT: vmset.m v7
242 ; CHECK-NEXT: addi a1, sp, 16
243 ; CHECK-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
244 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
245 ; CHECK-NEXT: vfwcvtbf16.f.f.v v24, v20
246 ; CHECK-NEXT: slli a1, a2, 1
247 ; CHECK-NEXT: srli a2, a2, 2
248 ; CHECK-NEXT: sub a3, a0, a1
249 ; CHECK-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
250 ; CHECK-NEXT: vslidedown.vx v0, v7, a2
251 ; CHECK-NEXT: sltu a2, a0, a3
252 ; CHECK-NEXT: addi a2, a2, -1
253 ; CHECK-NEXT: and a2, a2, a3
254 ; CHECK-NEXT: vsetvli a3, zero, e16, m4, ta, ma
255 ; CHECK-NEXT: vfwcvtbf16.f.f.v v16, v12
256 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
257 ; CHECK-NEXT: vfmin.vv v16, v16, v24, v0.t
258 ; CHECK-NEXT: vsetvli a2, zero, e16, m4, ta, ma
259 ; CHECK-NEXT: vfncvtbf16.f.f.w v12, v16
260 ; CHECK-NEXT: bltu a0, a1, .LBB11_2
261 ; CHECK-NEXT: # %bb.1:
262 ; CHECK-NEXT: mv a0, a1
263 ; CHECK-NEXT: .LBB11_2:
264 ; CHECK-NEXT: addi a1, sp, 16
265 ; CHECK-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
266 ; CHECK-NEXT: vfwcvtbf16.f.f.v v16, v24
267 ; CHECK-NEXT: vfwcvtbf16.f.f.v v24, v8
268 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
269 ; CHECK-NEXT: vfmin.vv v16, v24, v16
270 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
271 ; CHECK-NEXT: vfncvtbf16.f.f.w v8, v16
272 ; CHECK-NEXT: csrr a0, vlenb
273 ; CHECK-NEXT: slli a0, a0, 3
274 ; CHECK-NEXT: add sp, sp, a0
275 ; CHECK-NEXT: .cfi_def_cfa sp, 16
276 ; CHECK-NEXT: addi sp, sp, 16
277 ; CHECK-NEXT: .cfi_def_cfa_offset 0
279 %v = call <vscale x 32 x bfloat> @llvm.vp.minnum.nxv32bf16(<vscale x 32 x bfloat> %va, <vscale x 32 x bfloat> %vb, <vscale x 32 x i1> splat (i1 true), i32 %evl)
280 ret <vscale x 32 x bfloat> %v
282 declare <vscale x 1 x half> @llvm.vp.minnum.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x i1>, i32)
284 define <vscale x 1 x half> @vfmin_vv_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
285 ; ZVFH-LABEL: vfmin_vv_nxv1f16:
287 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
288 ; ZVFH-NEXT: vfmin.vv v8, v8, v9, v0.t
291 ; ZVFHMIN-LABEL: vfmin_vv_nxv1f16:
293 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
294 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
295 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
296 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
297 ; ZVFHMIN-NEXT: vfmin.vv v9, v9, v10, v0.t
298 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
299 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
301 %v = call <vscale x 1 x half> @llvm.vp.minnum.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> %m, i32 %evl)
302 ret <vscale x 1 x half> %v
305 define <vscale x 1 x half> @vfmin_vv_nxv1f16_unmasked(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, i32 zeroext %evl) {
306 ; ZVFH-LABEL: vfmin_vv_nxv1f16_unmasked:
308 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
309 ; ZVFH-NEXT: vfmin.vv v8, v8, v9
312 ; ZVFHMIN-LABEL: vfmin_vv_nxv1f16_unmasked:
314 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
315 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
316 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
317 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
318 ; ZVFHMIN-NEXT: vfmin.vv v9, v9, v10
319 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
320 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
322 %v = call <vscale x 1 x half> @llvm.vp.minnum.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
323 ret <vscale x 1 x half> %v
326 declare <vscale x 2 x half> @llvm.vp.minnum.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x i1>, i32)
328 define <vscale x 2 x half> @vfmin_vv_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> %m, i32 zeroext %evl) {
329 ; ZVFH-LABEL: vfmin_vv_nxv2f16:
331 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
332 ; ZVFH-NEXT: vfmin.vv v8, v8, v9, v0.t
335 ; ZVFHMIN-LABEL: vfmin_vv_nxv2f16:
337 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
338 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
339 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
340 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
341 ; ZVFHMIN-NEXT: vfmin.vv v9, v9, v10, v0.t
342 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
343 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
345 %v = call <vscale x 2 x half> @llvm.vp.minnum.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> %m, i32 %evl)
346 ret <vscale x 2 x half> %v
349 define <vscale x 2 x half> @vfmin_vv_nxv2f16_unmasked(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, i32 zeroext %evl) {
350 ; ZVFH-LABEL: vfmin_vv_nxv2f16_unmasked:
352 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
353 ; ZVFH-NEXT: vfmin.vv v8, v8, v9
356 ; ZVFHMIN-LABEL: vfmin_vv_nxv2f16_unmasked:
358 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
359 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
360 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
361 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
362 ; ZVFHMIN-NEXT: vfmin.vv v9, v9, v10
363 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
364 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
366 %v = call <vscale x 2 x half> @llvm.vp.minnum.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
367 ret <vscale x 2 x half> %v
370 declare <vscale x 4 x half> @llvm.vp.minnum.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x i1>, i32)
372 define <vscale x 4 x half> @vfmin_vv_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> %m, i32 zeroext %evl) {
373 ; ZVFH-LABEL: vfmin_vv_nxv4f16:
375 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
376 ; ZVFH-NEXT: vfmin.vv v8, v8, v9, v0.t
379 ; ZVFHMIN-LABEL: vfmin_vv_nxv4f16:
381 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m1, ta, ma
382 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
383 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
384 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
385 ; ZVFHMIN-NEXT: vfmin.vv v10, v12, v10, v0.t
386 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
387 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
389 %v = call <vscale x 4 x half> @llvm.vp.minnum.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> %m, i32 %evl)
390 ret <vscale x 4 x half> %v
393 define <vscale x 4 x half> @vfmin_vv_nxv4f16_unmasked(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, i32 zeroext %evl) {
394 ; ZVFH-LABEL: vfmin_vv_nxv4f16_unmasked:
396 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
397 ; ZVFH-NEXT: vfmin.vv v8, v8, v9
400 ; ZVFHMIN-LABEL: vfmin_vv_nxv4f16_unmasked:
402 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m1, ta, ma
403 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
404 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
405 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
406 ; ZVFHMIN-NEXT: vfmin.vv v10, v12, v10
407 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
408 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
410 %v = call <vscale x 4 x half> @llvm.vp.minnum.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
411 ret <vscale x 4 x half> %v
414 declare <vscale x 8 x half> @llvm.vp.minnum.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x i1>, i32)
416 define <vscale x 8 x half> @vfmin_vv_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
417 ; ZVFH-LABEL: vfmin_vv_nxv8f16:
419 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
420 ; ZVFH-NEXT: vfmin.vv v8, v8, v10, v0.t
423 ; ZVFHMIN-LABEL: vfmin_vv_nxv8f16:
425 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m2, ta, ma
426 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
427 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
428 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
429 ; ZVFHMIN-NEXT: vfmin.vv v12, v16, v12, v0.t
430 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
431 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
433 %v = call <vscale x 8 x half> @llvm.vp.minnum.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> %m, i32 %evl)
434 ret <vscale x 8 x half> %v
437 define <vscale x 8 x half> @vfmin_vv_nxv8f16_unmasked(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, i32 zeroext %evl) {
438 ; ZVFH-LABEL: vfmin_vv_nxv8f16_unmasked:
440 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
441 ; ZVFH-NEXT: vfmin.vv v8, v8, v10
444 ; ZVFHMIN-LABEL: vfmin_vv_nxv8f16_unmasked:
446 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m2, ta, ma
447 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
448 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
449 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
450 ; ZVFHMIN-NEXT: vfmin.vv v12, v16, v12
451 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
452 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
454 %v = call <vscale x 8 x half> @llvm.vp.minnum.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
455 ret <vscale x 8 x half> %v
458 declare <vscale x 16 x half> @llvm.vp.minnum.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>, <vscale x 16 x i1>, i32)
460 define <vscale x 16 x half> @vfmin_vv_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> %m, i32 zeroext %evl) {
461 ; ZVFH-LABEL: vfmin_vv_nxv16f16:
463 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
464 ; ZVFH-NEXT: vfmin.vv v8, v8, v12, v0.t
467 ; ZVFHMIN-LABEL: vfmin_vv_nxv16f16:
469 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
470 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
471 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
472 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
473 ; ZVFHMIN-NEXT: vfmin.vv v16, v24, v16, v0.t
474 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
475 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
477 %v = call <vscale x 16 x half> @llvm.vp.minnum.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> %m, i32 %evl)
478 ret <vscale x 16 x half> %v
481 define <vscale x 16 x half> @vfmin_vv_nxv16f16_unmasked(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, i32 zeroext %evl) {
482 ; ZVFH-LABEL: vfmin_vv_nxv16f16_unmasked:
484 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
485 ; ZVFH-NEXT: vfmin.vv v8, v8, v12
488 ; ZVFHMIN-LABEL: vfmin_vv_nxv16f16_unmasked:
490 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
491 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
492 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
493 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
494 ; ZVFHMIN-NEXT: vfmin.vv v16, v24, v16
495 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
496 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
498 %v = call <vscale x 16 x half> @llvm.vp.minnum.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
499 ret <vscale x 16 x half> %v
502 declare <vscale x 32 x half> @llvm.vp.minnum.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>, <vscale x 32 x i1>, i32)
504 define <vscale x 32 x half> @vfmin_vv_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> %m, i32 zeroext %evl) {
505 ; ZVFH-LABEL: vfmin_vv_nxv32f16:
507 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
508 ; ZVFH-NEXT: vfmin.vv v8, v8, v16, v0.t
511 ; ZVFHMIN-LABEL: vfmin_vv_nxv32f16:
513 ; ZVFHMIN-NEXT: addi sp, sp, -16
514 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
515 ; ZVFHMIN-NEXT: csrr a1, vlenb
516 ; ZVFHMIN-NEXT: slli a1, a1, 3
517 ; ZVFHMIN-NEXT: sub sp, sp, a1
518 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
519 ; ZVFHMIN-NEXT: vmv1r.v v7, v0
520 ; ZVFHMIN-NEXT: csrr a2, vlenb
521 ; ZVFHMIN-NEXT: addi a1, sp, 16
522 ; ZVFHMIN-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
523 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
524 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v20
525 ; ZVFHMIN-NEXT: slli a1, a2, 1
526 ; ZVFHMIN-NEXT: srli a2, a2, 2
527 ; ZVFHMIN-NEXT: sub a3, a0, a1
528 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
529 ; ZVFHMIN-NEXT: vslidedown.vx v0, v0, a2
530 ; ZVFHMIN-NEXT: sltu a2, a0, a3
531 ; ZVFHMIN-NEXT: addi a2, a2, -1
532 ; ZVFHMIN-NEXT: and a2, a2, a3
533 ; ZVFHMIN-NEXT: vsetvli a3, zero, e16, m4, ta, ma
534 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
535 ; ZVFHMIN-NEXT: vsetvli zero, a2, e32, m8, ta, ma
536 ; ZVFHMIN-NEXT: vfmin.vv v16, v16, v24, v0.t
537 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
538 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
539 ; ZVFHMIN-NEXT: bltu a0, a1, .LBB22_2
540 ; ZVFHMIN-NEXT: # %bb.1:
541 ; ZVFHMIN-NEXT: mv a0, a1
542 ; ZVFHMIN-NEXT: .LBB22_2:
543 ; ZVFHMIN-NEXT: addi a1, sp, 16
544 ; ZVFHMIN-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
545 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v24
546 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
547 ; ZVFHMIN-NEXT: vmv1r.v v0, v7
548 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
549 ; ZVFHMIN-NEXT: vfmin.vv v16, v24, v16, v0.t
550 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
551 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
552 ; ZVFHMIN-NEXT: csrr a0, vlenb
553 ; ZVFHMIN-NEXT: slli a0, a0, 3
554 ; ZVFHMIN-NEXT: add sp, sp, a0
555 ; ZVFHMIN-NEXT: .cfi_def_cfa sp, 16
556 ; ZVFHMIN-NEXT: addi sp, sp, 16
557 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 0
559 %v = call <vscale x 32 x half> @llvm.vp.minnum.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> %m, i32 %evl)
560 ret <vscale x 32 x half> %v
563 define <vscale x 32 x half> @vfmin_vv_nxv32f16_unmasked(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, i32 zeroext %evl) {
564 ; ZVFH-LABEL: vfmin_vv_nxv32f16_unmasked:
566 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
567 ; ZVFH-NEXT: vfmin.vv v8, v8, v16
570 ; ZVFHMIN-LABEL: vfmin_vv_nxv32f16_unmasked:
572 ; ZVFHMIN-NEXT: addi sp, sp, -16
573 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
574 ; ZVFHMIN-NEXT: csrr a1, vlenb
575 ; ZVFHMIN-NEXT: slli a1, a1, 3
576 ; ZVFHMIN-NEXT: sub sp, sp, a1
577 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
578 ; ZVFHMIN-NEXT: csrr a2, vlenb
579 ; ZVFHMIN-NEXT: vsetvli a1, zero, e8, m4, ta, ma
580 ; ZVFHMIN-NEXT: vmset.m v7
581 ; ZVFHMIN-NEXT: addi a1, sp, 16
582 ; ZVFHMIN-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
583 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
584 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v20
585 ; ZVFHMIN-NEXT: slli a1, a2, 1
586 ; ZVFHMIN-NEXT: srli a2, a2, 2
587 ; ZVFHMIN-NEXT: sub a3, a0, a1
588 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
589 ; ZVFHMIN-NEXT: vslidedown.vx v0, v7, a2
590 ; ZVFHMIN-NEXT: sltu a2, a0, a3
591 ; ZVFHMIN-NEXT: addi a2, a2, -1
592 ; ZVFHMIN-NEXT: and a2, a2, a3
593 ; ZVFHMIN-NEXT: vsetvli a3, zero, e16, m4, ta, ma
594 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
595 ; ZVFHMIN-NEXT: vsetvli zero, a2, e32, m8, ta, ma
596 ; ZVFHMIN-NEXT: vfmin.vv v16, v16, v24, v0.t
597 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
598 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
599 ; ZVFHMIN-NEXT: bltu a0, a1, .LBB23_2
600 ; ZVFHMIN-NEXT: # %bb.1:
601 ; ZVFHMIN-NEXT: mv a0, a1
602 ; ZVFHMIN-NEXT: .LBB23_2:
603 ; ZVFHMIN-NEXT: addi a1, sp, 16
604 ; ZVFHMIN-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
605 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v24
606 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
607 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
608 ; ZVFHMIN-NEXT: vfmin.vv v16, v24, v16
609 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
610 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
611 ; ZVFHMIN-NEXT: csrr a0, vlenb
612 ; ZVFHMIN-NEXT: slli a0, a0, 3
613 ; ZVFHMIN-NEXT: add sp, sp, a0
614 ; ZVFHMIN-NEXT: .cfi_def_cfa sp, 16
615 ; ZVFHMIN-NEXT: addi sp, sp, 16
616 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 0
618 %v = call <vscale x 32 x half> @llvm.vp.minnum.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> splat (i1 true), i32 %evl)
619 ret <vscale x 32 x half> %v
622 declare <vscale x 1 x float> @llvm.vp.minnum.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x i1>, i32)
624 define <vscale x 1 x float> @vfmin_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
625 ; CHECK-LABEL: vfmin_vv_nxv1f32:
627 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
628 ; CHECK-NEXT: vfmin.vv v8, v8, v9, v0.t
630 %v = call <vscale x 1 x float> @llvm.vp.minnum.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> %m, i32 %evl)
631 ret <vscale x 1 x float> %v
634 define <vscale x 1 x float> @vfmin_vv_nxv1f32_unmasked(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, i32 zeroext %evl) {
635 ; CHECK-LABEL: vfmin_vv_nxv1f32_unmasked:
637 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
638 ; CHECK-NEXT: vfmin.vv v8, v8, v9
640 %v = call <vscale x 1 x float> @llvm.vp.minnum.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
641 ret <vscale x 1 x float> %v
644 declare <vscale x 2 x float> @llvm.vp.minnum.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x i1>, i32)
646 define <vscale x 2 x float> @vfmin_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> %m, i32 zeroext %evl) {
647 ; CHECK-LABEL: vfmin_vv_nxv2f32:
649 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
650 ; CHECK-NEXT: vfmin.vv v8, v8, v9, v0.t
652 %v = call <vscale x 2 x float> @llvm.vp.minnum.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> %m, i32 %evl)
653 ret <vscale x 2 x float> %v
656 define <vscale x 2 x float> @vfmin_vv_nxv2f32_unmasked(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, i32 zeroext %evl) {
657 ; CHECK-LABEL: vfmin_vv_nxv2f32_unmasked:
659 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
660 ; CHECK-NEXT: vfmin.vv v8, v8, v9
662 %v = call <vscale x 2 x float> @llvm.vp.minnum.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
663 ret <vscale x 2 x float> %v
666 declare <vscale x 4 x float> @llvm.vp.minnum.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x i1>, i32)
668 define <vscale x 4 x float> @vfmin_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> %m, i32 zeroext %evl) {
669 ; CHECK-LABEL: vfmin_vv_nxv4f32:
671 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
672 ; CHECK-NEXT: vfmin.vv v8, v8, v10, v0.t
674 %v = call <vscale x 4 x float> @llvm.vp.minnum.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> %m, i32 %evl)
675 ret <vscale x 4 x float> %v
678 define <vscale x 4 x float> @vfmin_vv_nxv4f32_unmasked(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, i32 zeroext %evl) {
679 ; CHECK-LABEL: vfmin_vv_nxv4f32_unmasked:
681 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
682 ; CHECK-NEXT: vfmin.vv v8, v8, v10
684 %v = call <vscale x 4 x float> @llvm.vp.minnum.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
685 ret <vscale x 4 x float> %v
688 declare <vscale x 8 x float> @llvm.vp.minnum.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>, <vscale x 8 x i1>, i32)
690 define <vscale x 8 x float> @vfmin_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
691 ; CHECK-LABEL: vfmin_vv_nxv8f32:
693 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
694 ; CHECK-NEXT: vfmin.vv v8, v8, v12, v0.t
696 %v = call <vscale x 8 x float> @llvm.vp.minnum.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> %m, i32 %evl)
697 ret <vscale x 8 x float> %v
700 define <vscale x 8 x float> @vfmin_vv_nxv8f32_unmasked(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, i32 zeroext %evl) {
701 ; CHECK-LABEL: vfmin_vv_nxv8f32_unmasked:
703 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
704 ; CHECK-NEXT: vfmin.vv v8, v8, v12
706 %v = call <vscale x 8 x float> @llvm.vp.minnum.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
707 ret <vscale x 8 x float> %v
710 declare <vscale x 16 x float> @llvm.vp.minnum.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x i1>, i32)
712 define <vscale x 16 x float> @vfmin_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> %m, i32 zeroext %evl) {
713 ; CHECK-LABEL: vfmin_vv_nxv16f32:
715 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
716 ; CHECK-NEXT: vfmin.vv v8, v8, v16, v0.t
718 %v = call <vscale x 16 x float> @llvm.vp.minnum.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> %m, i32 %evl)
719 ret <vscale x 16 x float> %v
722 define <vscale x 16 x float> @vfmin_vv_nxv16f32_unmasked(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, i32 zeroext %evl) {
723 ; CHECK-LABEL: vfmin_vv_nxv16f32_unmasked:
725 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
726 ; CHECK-NEXT: vfmin.vv v8, v8, v16
728 %v = call <vscale x 16 x float> @llvm.vp.minnum.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
729 ret <vscale x 16 x float> %v
732 declare <vscale x 1 x double> @llvm.vp.minnum.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x i1>, i32)
734 define <vscale x 1 x double> @vfmin_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
735 ; CHECK-LABEL: vfmin_vv_nxv1f64:
737 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
738 ; CHECK-NEXT: vfmin.vv v8, v8, v9, v0.t
740 %v = call <vscale x 1 x double> @llvm.vp.minnum.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> %m, i32 %evl)
741 ret <vscale x 1 x double> %v
744 define <vscale x 1 x double> @vfmin_vv_nxv1f64_unmasked(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, i32 zeroext %evl) {
745 ; CHECK-LABEL: vfmin_vv_nxv1f64_unmasked:
747 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
748 ; CHECK-NEXT: vfmin.vv v8, v8, v9
750 %v = call <vscale x 1 x double> @llvm.vp.minnum.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
751 ret <vscale x 1 x double> %v
754 declare <vscale x 2 x double> @llvm.vp.minnum.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x i1>, i32)
756 define <vscale x 2 x double> @vfmin_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> %m, i32 zeroext %evl) {
757 ; CHECK-LABEL: vfmin_vv_nxv2f64:
759 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
760 ; CHECK-NEXT: vfmin.vv v8, v8, v10, v0.t
762 %v = call <vscale x 2 x double> @llvm.vp.minnum.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> %m, i32 %evl)
763 ret <vscale x 2 x double> %v
766 define <vscale x 2 x double> @vfmin_vv_nxv2f64_unmasked(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, i32 zeroext %evl) {
767 ; CHECK-LABEL: vfmin_vv_nxv2f64_unmasked:
769 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
770 ; CHECK-NEXT: vfmin.vv v8, v8, v10
772 %v = call <vscale x 2 x double> @llvm.vp.minnum.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
773 ret <vscale x 2 x double> %v
776 declare <vscale x 4 x double> @llvm.vp.minnum.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>, <vscale x 4 x i1>, i32)
778 define <vscale x 4 x double> @vfmin_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> %m, i32 zeroext %evl) {
779 ; CHECK-LABEL: vfmin_vv_nxv4f64:
781 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
782 ; CHECK-NEXT: vfmin.vv v8, v8, v12, v0.t
784 %v = call <vscale x 4 x double> @llvm.vp.minnum.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> %m, i32 %evl)
785 ret <vscale x 4 x double> %v
788 define <vscale x 4 x double> @vfmin_vv_nxv4f64_unmasked(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, i32 zeroext %evl) {
789 ; CHECK-LABEL: vfmin_vv_nxv4f64_unmasked:
791 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
792 ; CHECK-NEXT: vfmin.vv v8, v8, v12
794 %v = call <vscale x 4 x double> @llvm.vp.minnum.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
795 ret <vscale x 4 x double> %v
798 declare <vscale x 8 x double> @llvm.vp.minnum.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>, <vscale x 8 x i1>, i32)
800 define <vscale x 8 x double> @vfmin_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
801 ; CHECK-LABEL: vfmin_vv_nxv8f64:
803 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
804 ; CHECK-NEXT: vfmin.vv v8, v8, v16, v0.t
806 %v = call <vscale x 8 x double> @llvm.vp.minnum.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> %m, i32 %evl)
807 ret <vscale x 8 x double> %v
810 define <vscale x 8 x double> @vfmin_vv_nxv8f64_unmasked(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, i32 zeroext %evl) {
811 ; CHECK-LABEL: vfmin_vv_nxv8f64_unmasked:
813 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
814 ; CHECK-NEXT: vfmin.vv v8, v8, v16
816 %v = call <vscale x 8 x double> @llvm.vp.minnum.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
817 ret <vscale x 8 x double> %v