1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zvfh,+v -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
6 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfhmin,+zvfhmin,+v -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfhmin,+zvfhmin,+v -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 declare <vscale x 1 x half> @llvm.vp.copysign.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x i1>, i32)
13 define <vscale x 1 x half> @vfsgnj_vv_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
14 ; ZVFH-LABEL: vfsgnj_vv_nxv1f16:
16 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
17 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9, v0.t
20 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv1f16:
22 ; ZVFHMIN-NEXT: lui a1, 8
23 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
24 ; ZVFHMIN-NEXT: vand.vx v9, v9, a1, v0.t
25 ; ZVFHMIN-NEXT: addi a1, a1, -1
26 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1, v0.t
27 ; ZVFHMIN-NEXT: vor.vv v8, v8, v9, v0.t
29 %v = call <vscale x 1 x half> @llvm.vp.copysign.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> %m, i32 %evl)
30 ret <vscale x 1 x half> %v
33 define <vscale x 1 x half> @vfsgnj_vv_nxv1f16_unmasked(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, i32 zeroext %evl) {
34 ; ZVFH-LABEL: vfsgnj_vv_nxv1f16_unmasked:
36 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
37 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9
40 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv1f16_unmasked:
42 ; ZVFHMIN-NEXT: lui a1, 8
43 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
44 ; ZVFHMIN-NEXT: vand.vx v9, v9, a1
45 ; ZVFHMIN-NEXT: addi a1, a1, -1
46 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1
47 ; ZVFHMIN-NEXT: vor.vv v8, v8, v9
49 %v = call <vscale x 1 x half> @llvm.vp.copysign.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
50 ret <vscale x 1 x half> %v
53 declare <vscale x 2 x half> @llvm.vp.copysign.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x i1>, i32)
55 define <vscale x 2 x half> @vfsgnj_vv_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> %m, i32 zeroext %evl) {
56 ; ZVFH-LABEL: vfsgnj_vv_nxv2f16:
58 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
59 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9, v0.t
62 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv2f16:
64 ; ZVFHMIN-NEXT: lui a1, 8
65 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
66 ; ZVFHMIN-NEXT: vand.vx v9, v9, a1, v0.t
67 ; ZVFHMIN-NEXT: addi a1, a1, -1
68 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1, v0.t
69 ; ZVFHMIN-NEXT: vor.vv v8, v8, v9, v0.t
71 %v = call <vscale x 2 x half> @llvm.vp.copysign.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> %m, i32 %evl)
72 ret <vscale x 2 x half> %v
75 define <vscale x 2 x half> @vfsgnj_vv_nxv2f16_unmasked(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, i32 zeroext %evl) {
76 ; ZVFH-LABEL: vfsgnj_vv_nxv2f16_unmasked:
78 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
79 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9
82 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv2f16_unmasked:
84 ; ZVFHMIN-NEXT: lui a1, 8
85 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
86 ; ZVFHMIN-NEXT: vand.vx v9, v9, a1
87 ; ZVFHMIN-NEXT: addi a1, a1, -1
88 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1
89 ; ZVFHMIN-NEXT: vor.vv v8, v8, v9
91 %v = call <vscale x 2 x half> @llvm.vp.copysign.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
92 ret <vscale x 2 x half> %v
95 declare <vscale x 4 x half> @llvm.vp.copysign.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x i1>, i32)
97 define <vscale x 4 x half> @vfsgnj_vv_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> %m, i32 zeroext %evl) {
98 ; ZVFH-LABEL: vfsgnj_vv_nxv4f16:
100 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
101 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9, v0.t
104 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv4f16:
106 ; ZVFHMIN-NEXT: lui a1, 8
107 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
108 ; ZVFHMIN-NEXT: vand.vx v9, v9, a1, v0.t
109 ; ZVFHMIN-NEXT: addi a1, a1, -1
110 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1, v0.t
111 ; ZVFHMIN-NEXT: vor.vv v8, v8, v9, v0.t
113 %v = call <vscale x 4 x half> @llvm.vp.copysign.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> %m, i32 %evl)
114 ret <vscale x 4 x half> %v
117 define <vscale x 4 x half> @vfsgnj_vv_nxv4f16_unmasked(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, i32 zeroext %evl) {
118 ; ZVFH-LABEL: vfsgnj_vv_nxv4f16_unmasked:
120 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
121 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9
124 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv4f16_unmasked:
126 ; ZVFHMIN-NEXT: lui a1, 8
127 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
128 ; ZVFHMIN-NEXT: vand.vx v9, v9, a1
129 ; ZVFHMIN-NEXT: addi a1, a1, -1
130 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1
131 ; ZVFHMIN-NEXT: vor.vv v8, v8, v9
133 %v = call <vscale x 4 x half> @llvm.vp.copysign.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
134 ret <vscale x 4 x half> %v
137 declare <vscale x 8 x half> @llvm.vp.copysign.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x i1>, i32)
139 define <vscale x 8 x half> @vfsgnj_vv_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
140 ; ZVFH-LABEL: vfsgnj_vv_nxv8f16:
142 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
143 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v10, v0.t
146 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv8f16:
148 ; ZVFHMIN-NEXT: lui a1, 8
149 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
150 ; ZVFHMIN-NEXT: vand.vx v10, v10, a1, v0.t
151 ; ZVFHMIN-NEXT: addi a1, a1, -1
152 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1, v0.t
153 ; ZVFHMIN-NEXT: vor.vv v8, v8, v10, v0.t
155 %v = call <vscale x 8 x half> @llvm.vp.copysign.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> %m, i32 %evl)
156 ret <vscale x 8 x half> %v
159 define <vscale x 8 x half> @vfsgnj_vv_nxv8f16_unmasked(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, i32 zeroext %evl) {
160 ; ZVFH-LABEL: vfsgnj_vv_nxv8f16_unmasked:
162 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
163 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v10
166 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv8f16_unmasked:
168 ; ZVFHMIN-NEXT: lui a1, 8
169 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
170 ; ZVFHMIN-NEXT: vand.vx v10, v10, a1
171 ; ZVFHMIN-NEXT: addi a1, a1, -1
172 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1
173 ; ZVFHMIN-NEXT: vor.vv v8, v8, v10
175 %v = call <vscale x 8 x half> @llvm.vp.copysign.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
176 ret <vscale x 8 x half> %v
179 declare <vscale x 16 x half> @llvm.vp.copysign.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>, <vscale x 16 x i1>, i32)
181 define <vscale x 16 x half> @vfsgnj_vv_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> %m, i32 zeroext %evl) {
182 ; ZVFH-LABEL: vfsgnj_vv_nxv16f16:
184 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
185 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v12, v0.t
188 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv16f16:
190 ; ZVFHMIN-NEXT: lui a1, 8
191 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
192 ; ZVFHMIN-NEXT: vand.vx v12, v12, a1, v0.t
193 ; ZVFHMIN-NEXT: addi a1, a1, -1
194 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1, v0.t
195 ; ZVFHMIN-NEXT: vor.vv v8, v8, v12, v0.t
197 %v = call <vscale x 16 x half> @llvm.vp.copysign.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> %m, i32 %evl)
198 ret <vscale x 16 x half> %v
201 define <vscale x 16 x half> @vfsgnj_vv_nxv16f16_unmasked(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, i32 zeroext %evl) {
202 ; ZVFH-LABEL: vfsgnj_vv_nxv16f16_unmasked:
204 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
205 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v12
208 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv16f16_unmasked:
210 ; ZVFHMIN-NEXT: lui a1, 8
211 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
212 ; ZVFHMIN-NEXT: vand.vx v12, v12, a1
213 ; ZVFHMIN-NEXT: addi a1, a1, -1
214 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1
215 ; ZVFHMIN-NEXT: vor.vv v8, v8, v12
217 %v = call <vscale x 16 x half> @llvm.vp.copysign.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <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.copysign.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>, <vscale x 32 x i1>, i32)
223 define <vscale x 32 x half> @vfsgnj_vv_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> %m, i32 zeroext %evl) {
224 ; ZVFH-LABEL: vfsgnj_vv_nxv32f16:
226 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
227 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v16, v0.t
230 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv32f16:
232 ; ZVFHMIN-NEXT: lui a1, 8
233 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m8, ta, ma
234 ; ZVFHMIN-NEXT: vand.vx v16, v16, a1, v0.t
235 ; ZVFHMIN-NEXT: addi a1, a1, -1
236 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1, v0.t
237 ; ZVFHMIN-NEXT: vor.vv v8, v8, v16, v0.t
239 %v = call <vscale x 32 x half> @llvm.vp.copysign.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> %m, i32 %evl)
240 ret <vscale x 32 x half> %v
243 define <vscale x 32 x half> @vfsgnj_vv_nxv32f16_unmasked(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, i32 zeroext %evl) {
244 ; ZVFH-LABEL: vfsgnj_vv_nxv32f16_unmasked:
246 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
247 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v16
250 ; ZVFHMIN-LABEL: vfsgnj_vv_nxv32f16_unmasked:
252 ; ZVFHMIN-NEXT: lui a1, 8
253 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m8, ta, ma
254 ; ZVFHMIN-NEXT: vand.vx v16, v16, a1
255 ; ZVFHMIN-NEXT: addi a1, a1, -1
256 ; ZVFHMIN-NEXT: vand.vx v8, v8, a1
257 ; ZVFHMIN-NEXT: vor.vv v8, v8, v16
259 %v = call <vscale x 32 x half> @llvm.vp.copysign.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> splat (i1 true), i32 %evl)
260 ret <vscale x 32 x half> %v
263 declare <vscale x 1 x float> @llvm.vp.copysign.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x i1>, i32)
265 define <vscale x 1 x float> @vfsgnj_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
266 ; CHECK-LABEL: vfsgnj_vv_nxv1f32:
268 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
269 ; CHECK-NEXT: vfsgnj.vv v8, v8, v9, v0.t
271 %v = call <vscale x 1 x float> @llvm.vp.copysign.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> %m, i32 %evl)
272 ret <vscale x 1 x float> %v
275 define <vscale x 1 x float> @vfsgnj_vv_nxv1f32_unmasked(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, i32 zeroext %evl) {
276 ; CHECK-LABEL: vfsgnj_vv_nxv1f32_unmasked:
278 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
279 ; CHECK-NEXT: vfsgnj.vv v8, v8, v9
281 %v = call <vscale x 1 x float> @llvm.vp.copysign.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
282 ret <vscale x 1 x float> %v
285 declare <vscale x 2 x float> @llvm.vp.copysign.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x i1>, i32)
287 define <vscale x 2 x float> @vfsgnj_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> %m, i32 zeroext %evl) {
288 ; CHECK-LABEL: vfsgnj_vv_nxv2f32:
290 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
291 ; CHECK-NEXT: vfsgnj.vv v8, v8, v9, v0.t
293 %v = call <vscale x 2 x float> @llvm.vp.copysign.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> %m, i32 %evl)
294 ret <vscale x 2 x float> %v
297 define <vscale x 2 x float> @vfsgnj_vv_nxv2f32_unmasked(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, i32 zeroext %evl) {
298 ; CHECK-LABEL: vfsgnj_vv_nxv2f32_unmasked:
300 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
301 ; CHECK-NEXT: vfsgnj.vv v8, v8, v9
303 %v = call <vscale x 2 x float> @llvm.vp.copysign.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
304 ret <vscale x 2 x float> %v
307 declare <vscale x 4 x float> @llvm.vp.copysign.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x i1>, i32)
309 define <vscale x 4 x float> @vfsgnj_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> %m, i32 zeroext %evl) {
310 ; CHECK-LABEL: vfsgnj_vv_nxv4f32:
312 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
313 ; CHECK-NEXT: vfsgnj.vv v8, v8, v10, v0.t
315 %v = call <vscale x 4 x float> @llvm.vp.copysign.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> %m, i32 %evl)
316 ret <vscale x 4 x float> %v
319 define <vscale x 4 x float> @vfsgnj_vv_nxv4f32_unmasked(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, i32 zeroext %evl) {
320 ; CHECK-LABEL: vfsgnj_vv_nxv4f32_unmasked:
322 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
323 ; CHECK-NEXT: vfsgnj.vv v8, v8, v10
325 %v = call <vscale x 4 x float> @llvm.vp.copysign.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
326 ret <vscale x 4 x float> %v
329 declare <vscale x 8 x float> @llvm.vp.copysign.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>, <vscale x 8 x i1>, i32)
331 define <vscale x 8 x float> @vfsgnj_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
332 ; CHECK-LABEL: vfsgnj_vv_nxv8f32:
334 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
335 ; CHECK-NEXT: vfsgnj.vv v8, v8, v12, v0.t
337 %v = call <vscale x 8 x float> @llvm.vp.copysign.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> %m, i32 %evl)
338 ret <vscale x 8 x float> %v
341 define <vscale x 8 x float> @vfsgnj_vv_nxv8f32_unmasked(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, i32 zeroext %evl) {
342 ; CHECK-LABEL: vfsgnj_vv_nxv8f32_unmasked:
344 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
345 ; CHECK-NEXT: vfsgnj.vv v8, v8, v12
347 %v = call <vscale x 8 x float> @llvm.vp.copysign.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
348 ret <vscale x 8 x float> %v
351 declare <vscale x 16 x float> @llvm.vp.copysign.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x i1>, i32)
353 define <vscale x 16 x float> @vfsgnj_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> %m, i32 zeroext %evl) {
354 ; CHECK-LABEL: vfsgnj_vv_nxv16f32:
356 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
357 ; CHECK-NEXT: vfsgnj.vv v8, v8, v16, v0.t
359 %v = call <vscale x 16 x float> @llvm.vp.copysign.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> %m, i32 %evl)
360 ret <vscale x 16 x float> %v
363 define <vscale x 16 x float> @vfsgnj_vv_nxv16f32_unmasked(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, i32 zeroext %evl) {
364 ; CHECK-LABEL: vfsgnj_vv_nxv16f32_unmasked:
366 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
367 ; CHECK-NEXT: vfsgnj.vv v8, v8, v16
369 %v = call <vscale x 16 x float> @llvm.vp.copysign.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
370 ret <vscale x 16 x float> %v
373 declare <vscale x 1 x double> @llvm.vp.copysign.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x i1>, i32)
375 define <vscale x 1 x double> @vfsgnj_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
376 ; CHECK-LABEL: vfsgnj_vv_nxv1f64:
378 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
379 ; CHECK-NEXT: vfsgnj.vv v8, v8, v9, v0.t
381 %v = call <vscale x 1 x double> @llvm.vp.copysign.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> %m, i32 %evl)
382 ret <vscale x 1 x double> %v
385 define <vscale x 1 x double> @vfsgnj_vv_nxv1f64_unmasked(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, i32 zeroext %evl) {
386 ; CHECK-LABEL: vfsgnj_vv_nxv1f64_unmasked:
388 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
389 ; CHECK-NEXT: vfsgnj.vv v8, v8, v9
391 %v = call <vscale x 1 x double> @llvm.vp.copysign.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
392 ret <vscale x 1 x double> %v
395 declare <vscale x 2 x double> @llvm.vp.copysign.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x i1>, i32)
397 define <vscale x 2 x double> @vfsgnj_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> %m, i32 zeroext %evl) {
398 ; CHECK-LABEL: vfsgnj_vv_nxv2f64:
400 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
401 ; CHECK-NEXT: vfsgnj.vv v8, v8, v10, v0.t
403 %v = call <vscale x 2 x double> @llvm.vp.copysign.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> %m, i32 %evl)
404 ret <vscale x 2 x double> %v
407 define <vscale x 2 x double> @vfsgnj_vv_nxv2f64_unmasked(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, i32 zeroext %evl) {
408 ; CHECK-LABEL: vfsgnj_vv_nxv2f64_unmasked:
410 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
411 ; CHECK-NEXT: vfsgnj.vv v8, v8, v10
413 %v = call <vscale x 2 x double> @llvm.vp.copysign.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
414 ret <vscale x 2 x double> %v
417 declare <vscale x 4 x double> @llvm.vp.copysign.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>, <vscale x 4 x i1>, i32)
419 define <vscale x 4 x double> @vfsgnj_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> %m, i32 zeroext %evl) {
420 ; CHECK-LABEL: vfsgnj_vv_nxv4f64:
422 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
423 ; CHECK-NEXT: vfsgnj.vv v8, v8, v12, v0.t
425 %v = call <vscale x 4 x double> @llvm.vp.copysign.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> %m, i32 %evl)
426 ret <vscale x 4 x double> %v
429 define <vscale x 4 x double> @vfsgnj_vv_nxv4f64_unmasked(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, i32 zeroext %evl) {
430 ; CHECK-LABEL: vfsgnj_vv_nxv4f64_unmasked:
432 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
433 ; CHECK-NEXT: vfsgnj.vv v8, v8, v12
435 %v = call <vscale x 4 x double> @llvm.vp.copysign.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
436 ret <vscale x 4 x double> %v
439 declare <vscale x 8 x double> @llvm.vp.copysign.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>, <vscale x 8 x i1>, i32)
441 define <vscale x 8 x double> @vfsgnj_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
442 ; CHECK-LABEL: vfsgnj_vv_nxv8f64:
444 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
445 ; CHECK-NEXT: vfsgnj.vv v8, v8, v16, v0.t
447 %v = call <vscale x 8 x double> @llvm.vp.copysign.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> %m, i32 %evl)
448 ret <vscale x 8 x double> %v
451 define <vscale x 8 x double> @vfsgnj_vv_nxv8f64_unmasked(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, i32 zeroext %evl) {
452 ; CHECK-LABEL: vfsgnj_vv_nxv8f64_unmasked:
454 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
455 ; CHECK-NEXT: vfsgnj.vv v8, v8, v16
457 %v = call <vscale x 8 x double> @llvm.vp.copysign.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
458 ret <vscale x 8 x double> %v