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,+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.copysign.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>)
13 define <vscale x 1 x half> @vfcopysign_vv_nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %vs) {
14 ; ZVFH-LABEL: vfcopysign_vv_nxv1f16:
16 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
17 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9
20 ; ZVFHMIN-LABEL: vfcopysign_vv_nxv1f16:
22 ; ZVFHMIN-NEXT: vsetvli a0, zero, 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, zero, e32, mf2, ta, ma
26 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v9, v10
27 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
28 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
30 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %vs)
31 ret <vscale x 1 x half> %r
34 define <vscale x 1 x half> @vfcopysign_vf_nxv1f16(<vscale x 1 x half> %vm, half %s) {
35 ; ZVFH-LABEL: vfcopysign_vf_nxv1f16:
37 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
38 ; ZVFH-NEXT: vfsgnj.vf v8, v8, fa0
41 ; ZVFHMIN-LABEL: vfcopysign_vf_nxv1f16:
43 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
44 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
45 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
46 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
47 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
48 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
49 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
50 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
51 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v9, v8
52 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
53 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
55 %head = insertelement <vscale x 1 x half> poison, half %s, i32 0
56 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
57 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %splat)
58 ret <vscale x 1 x half> %r
61 define <vscale x 1 x half> @vfcopynsign_vv_nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %vs) {
62 ; ZVFH-LABEL: vfcopynsign_vv_nxv1f16:
64 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
65 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v9
68 ; ZVFHMIN-LABEL: vfcopynsign_vv_nxv1f16:
70 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
71 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
72 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
73 ; ZVFHMIN-NEXT: vfneg.v v9, v10
74 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
75 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
76 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
77 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
78 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
79 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v9, v8
80 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
81 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
83 %n = fneg <vscale x 1 x half> %vs
84 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %n)
85 ret <vscale x 1 x half> %r
88 define <vscale x 1 x half> @vfcopynsign_vf_nxv1f16(<vscale x 1 x half> %vm, half %s) {
89 ; ZVFH-LABEL: vfcopynsign_vf_nxv1f16:
91 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
92 ; ZVFH-NEXT: vfsgnjn.vf v8, v8, fa0
95 ; ZVFHMIN-LABEL: vfcopynsign_vf_nxv1f16:
97 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
98 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
99 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
100 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
101 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
102 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
103 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
104 ; ZVFHMIN-NEXT: vfneg.v v9, v9
105 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
106 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
107 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
108 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
109 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
110 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v9, v8
111 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
112 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
114 %head = insertelement <vscale x 1 x half> poison, half %s, i32 0
115 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
116 %n = fneg <vscale x 1 x half> %splat
117 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %n)
118 ret <vscale x 1 x half> %r
121 define <vscale x 1 x half> @vfcopysign_exttrunc_vv_nxv1f16_nxv1f32(<vscale x 1 x half> %vm, <vscale x 1 x float> %vs) {
122 ; ZVFH-LABEL: vfcopysign_exttrunc_vv_nxv1f16_nxv1f32:
124 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
125 ; ZVFH-NEXT: vfncvt.f.f.w v10, v9
126 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v10
129 ; ZVFHMIN-LABEL: vfcopysign_exttrunc_vv_nxv1f16_nxv1f32:
131 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
132 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
133 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
134 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
135 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
136 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v9, v8
137 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
138 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
140 %e = fptrunc <vscale x 1 x float> %vs to <vscale x 1 x half>
141 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %e)
142 ret <vscale x 1 x half> %r
145 define <vscale x 1 x half> @vfcopysign_exttrunc_vf_nxv1f16_nxv1f32(<vscale x 1 x half> %vm, float %s) {
146 ; ZVFH-LABEL: vfcopysign_exttrunc_vf_nxv1f16_nxv1f32:
148 ; ZVFH-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
149 ; ZVFH-NEXT: vfmv.v.f v9, fa0
150 ; ZVFH-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
151 ; ZVFH-NEXT: vfncvt.f.f.w v10, v9
152 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v10
155 ; ZVFHMIN-LABEL: vfcopysign_exttrunc_vf_nxv1f16_nxv1f32:
157 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
158 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa0
159 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
160 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
161 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
162 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
163 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
164 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v9, v8
165 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
166 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
168 %head = insertelement <vscale x 1 x float> poison, float %s, i32 0
169 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
170 %esplat = fptrunc <vscale x 1 x float> %splat to <vscale x 1 x half>
171 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %esplat)
172 ret <vscale x 1 x half> %r
175 define <vscale x 1 x half> @vfcopynsign_exttrunc_vv_nxv1f16_nxv1f32(<vscale x 1 x half> %vm, <vscale x 1 x float> %vs) {
176 ; ZVFH-LABEL: vfcopynsign_exttrunc_vv_nxv1f16_nxv1f32:
178 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
179 ; ZVFH-NEXT: vfncvt.f.f.w v10, v9
180 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v10
183 ; ZVFHMIN-LABEL: vfcopynsign_exttrunc_vv_nxv1f16_nxv1f32:
185 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
186 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
187 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
188 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
189 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
190 ; ZVFHMIN-NEXT: vfneg.v v8, v9
191 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
192 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v8
193 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
194 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
195 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v10, v8
196 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
197 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
199 %n = fneg <vscale x 1 x float> %vs
200 %eneg = fptrunc <vscale x 1 x float> %n to <vscale x 1 x half>
201 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %eneg)
202 ret <vscale x 1 x half> %r
205 define <vscale x 1 x half> @vfcopynsign_exttrunc_vf_nxv1f16_nxv1f32(<vscale x 1 x half> %vm, float %s) {
206 ; ZVFH-LABEL: vfcopynsign_exttrunc_vf_nxv1f16_nxv1f32:
208 ; ZVFH-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
209 ; ZVFH-NEXT: vfmv.v.f v9, fa0
210 ; ZVFH-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
211 ; ZVFH-NEXT: vfncvt.f.f.w v10, v9
212 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v10
215 ; ZVFHMIN-LABEL: vfcopynsign_exttrunc_vf_nxv1f16_nxv1f32:
217 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
218 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa0
219 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
220 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
221 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
222 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
223 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
224 ; ZVFHMIN-NEXT: vfneg.v v8, v9
225 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
226 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v8
227 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
228 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
229 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v10, v8
230 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
231 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
233 %head = insertelement <vscale x 1 x float> poison, float %s, i32 0
234 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
235 %n = fneg <vscale x 1 x float> %splat
236 %eneg = fptrunc <vscale x 1 x float> %n to <vscale x 1 x half>
237 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %eneg)
238 ret <vscale x 1 x half> %r
241 define <vscale x 1 x half> @vfcopysign_exttrunc_vv_nxv1f16_nxv1f64(<vscale x 1 x half> %vm, <vscale x 1 x double> %vs) {
242 ; ZVFH-LABEL: vfcopysign_exttrunc_vv_nxv1f16_nxv1f64:
244 ; ZVFH-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
245 ; ZVFH-NEXT: vfncvt.rod.f.f.w v10, v9
246 ; ZVFH-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
247 ; ZVFH-NEXT: vfncvt.f.f.w v9, v10
248 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9
251 ; ZVFHMIN-LABEL: vfcopysign_exttrunc_vv_nxv1f16_nxv1f64:
253 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
254 ; ZVFHMIN-NEXT: vfncvt.rod.f.f.w v10, v9
255 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
256 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
257 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
258 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
259 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
260 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v10, v8
261 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
262 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
264 %e = fptrunc <vscale x 1 x double> %vs to <vscale x 1 x half>
265 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %e)
266 ret <vscale x 1 x half> %r
269 define <vscale x 1 x half> @vfcopysign_exttrunc_vf_nxv1f16_nxv1f64(<vscale x 1 x half> %vm, double %s) {
270 ; ZVFH-LABEL: vfcopysign_exttrunc_vf_nxv1f16_nxv1f64:
272 ; ZVFH-NEXT: vsetvli a0, zero, e64, m1, ta, ma
273 ; ZVFH-NEXT: vfmv.v.f v9, fa0
274 ; ZVFH-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
275 ; ZVFH-NEXT: vfncvt.rod.f.f.w v10, v9
276 ; ZVFH-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
277 ; ZVFH-NEXT: vfncvt.f.f.w v9, v10
278 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9
281 ; ZVFHMIN-LABEL: vfcopysign_exttrunc_vf_nxv1f16_nxv1f64:
283 ; ZVFHMIN-NEXT: vsetvli a0, zero, e64, m1, ta, ma
284 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa0
285 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
286 ; ZVFHMIN-NEXT: vfncvt.rod.f.f.w v10, v9
287 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
288 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
289 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
290 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
291 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
292 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v10, v8
293 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
294 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
296 %head = insertelement <vscale x 1 x double> poison, double %s, i32 0
297 %splat = shufflevector <vscale x 1 x double> %head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
298 %esplat = fptrunc <vscale x 1 x double> %splat to <vscale x 1 x half>
299 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %esplat)
300 ret <vscale x 1 x half> %r
303 define <vscale x 1 x half> @vfcopynsign_exttrunc_vv_nxv1f16_nxv1f64(<vscale x 1 x half> %vm, <vscale x 1 x double> %vs) {
304 ; ZVFH-LABEL: vfcopynsign_exttrunc_vv_nxv1f16_nxv1f64:
306 ; ZVFH-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
307 ; ZVFH-NEXT: vfncvt.rod.f.f.w v10, v9
308 ; ZVFH-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
309 ; ZVFH-NEXT: vfncvt.f.f.w v9, v10
310 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v9
313 ; ZVFHMIN-LABEL: vfcopynsign_exttrunc_vv_nxv1f16_nxv1f64:
315 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
316 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
317 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
318 ; ZVFHMIN-NEXT: vfncvt.rod.f.f.w v8, v9
319 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
320 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v8
321 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
322 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
323 ; ZVFHMIN-NEXT: vfneg.v v8, v8
324 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
325 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v8
326 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
327 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
328 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v10, v8
329 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
330 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
332 %n = fneg <vscale x 1 x double> %vs
333 %eneg = fptrunc <vscale x 1 x double> %n to <vscale x 1 x half>
334 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %eneg)
335 ret <vscale x 1 x half> %r
338 define <vscale x 1 x half> @vfcopynsign_exttrunc_vf_nxv1f16_nxv1f64(<vscale x 1 x half> %vm, double %s) {
339 ; ZVFH-LABEL: vfcopynsign_exttrunc_vf_nxv1f16_nxv1f64:
341 ; ZVFH-NEXT: vsetvli a0, zero, e64, m1, ta, ma
342 ; ZVFH-NEXT: vfmv.v.f v9, fa0
343 ; ZVFH-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
344 ; ZVFH-NEXT: vfncvt.rod.f.f.w v10, v9
345 ; ZVFH-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
346 ; ZVFH-NEXT: vfncvt.f.f.w v9, v10
347 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v9
350 ; ZVFHMIN-LABEL: vfcopynsign_exttrunc_vf_nxv1f16_nxv1f64:
352 ; ZVFHMIN-NEXT: vsetvli a0, zero, e64, m1, ta, ma
353 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa0
354 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
355 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
356 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
357 ; ZVFHMIN-NEXT: vfncvt.rod.f.f.w v8, v9
358 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
359 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v8
360 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
361 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
362 ; ZVFHMIN-NEXT: vfneg.v v8, v8
363 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
364 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v8
365 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
366 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
367 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v10, v8
368 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
369 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
371 %head = insertelement <vscale x 1 x double> poison, double %s, i32 0
372 %splat = shufflevector <vscale x 1 x double> %head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
373 %n = fneg <vscale x 1 x double> %splat
374 %eneg = fptrunc <vscale x 1 x double> %n to <vscale x 1 x half>
375 %r = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> %vm, <vscale x 1 x half> %eneg)
376 ret <vscale x 1 x half> %r
379 declare <vscale x 2 x half> @llvm.copysign.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>)
381 define <vscale x 2 x half> @vfcopysign_vv_nxv2f16(<vscale x 2 x half> %vm, <vscale x 2 x half> %vs) {
382 ; ZVFH-LABEL: vfcopysign_vv_nxv2f16:
384 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
385 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9
388 ; ZVFHMIN-LABEL: vfcopysign_vv_nxv2f16:
390 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
391 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
392 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
393 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
394 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v9, v10
395 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
396 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
398 %r = call <vscale x 2 x half> @llvm.copysign.nxv2f16(<vscale x 2 x half> %vm, <vscale x 2 x half> %vs)
399 ret <vscale x 2 x half> %r
402 define <vscale x 2 x half> @vfcopysign_vf_nxv2f16(<vscale x 2 x half> %vm, half %s) {
403 ; ZVFH-LABEL: vfcopysign_vf_nxv2f16:
405 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
406 ; ZVFH-NEXT: vfsgnj.vf v8, v8, fa0
409 ; ZVFHMIN-LABEL: vfcopysign_vf_nxv2f16:
411 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
412 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m1, ta, ma
413 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
414 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
415 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
416 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
417 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
418 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
419 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v9, v8
420 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
421 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
423 %head = insertelement <vscale x 2 x half> poison, half %s, i32 0
424 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
425 %r = call <vscale x 2 x half> @llvm.copysign.nxv2f16(<vscale x 2 x half> %vm, <vscale x 2 x half> %splat)
426 ret <vscale x 2 x half> %r
429 define <vscale x 2 x half> @vfcopynsign_vv_nxv2f16(<vscale x 2 x half> %vm, <vscale x 2 x half> %vs) {
430 ; ZVFH-LABEL: vfcopynsign_vv_nxv2f16:
432 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
433 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v9
436 ; ZVFHMIN-LABEL: vfcopynsign_vv_nxv2f16:
438 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
439 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
440 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
441 ; ZVFHMIN-NEXT: vfneg.v v9, v10
442 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
443 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
444 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
445 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
446 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
447 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v9, v8
448 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
449 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
451 %n = fneg <vscale x 2 x half> %vs
452 %r = call <vscale x 2 x half> @llvm.copysign.nxv2f16(<vscale x 2 x half> %vm, <vscale x 2 x half> %n)
453 ret <vscale x 2 x half> %r
456 define <vscale x 2 x half> @vfcopynsign_vf_nxv2f16(<vscale x 2 x half> %vm, half %s) {
457 ; ZVFH-LABEL: vfcopynsign_vf_nxv2f16:
459 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
460 ; ZVFH-NEXT: vfsgnjn.vf v8, v8, fa0
463 ; ZVFHMIN-LABEL: vfcopynsign_vf_nxv2f16:
465 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
466 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m1, ta, ma
467 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
468 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
469 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
470 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
471 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
472 ; ZVFHMIN-NEXT: vfneg.v v9, v9
473 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
474 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
475 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
476 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
477 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
478 ; ZVFHMIN-NEXT: vfsgnj.vv v9, v9, v8
479 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
480 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
482 %head = insertelement <vscale x 2 x half> poison, half %s, i32 0
483 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
484 %n = fneg <vscale x 2 x half> %splat
485 %r = call <vscale x 2 x half> @llvm.copysign.nxv2f16(<vscale x 2 x half> %vm, <vscale x 2 x half> %n)
486 ret <vscale x 2 x half> %r
489 declare <vscale x 4 x half> @llvm.copysign.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>)
491 define <vscale x 4 x half> @vfcopysign_vv_nxv4f16(<vscale x 4 x half> %vm, <vscale x 4 x half> %vs) {
492 ; ZVFH-LABEL: vfcopysign_vv_nxv4f16:
494 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
495 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v9
498 ; ZVFHMIN-LABEL: vfcopysign_vv_nxv4f16:
500 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
501 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
502 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
503 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
504 ; ZVFHMIN-NEXT: vfsgnj.vv v10, v12, v10
505 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
506 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
508 %r = call <vscale x 4 x half> @llvm.copysign.nxv4f16(<vscale x 4 x half> %vm, <vscale x 4 x half> %vs)
509 ret <vscale x 4 x half> %r
512 define <vscale x 4 x half> @vfcopysign_vf_nxv4f16(<vscale x 4 x half> %vm, half %s) {
513 ; ZVFH-LABEL: vfcopysign_vf_nxv4f16:
515 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
516 ; ZVFH-NEXT: vfsgnj.vf v8, v8, fa0
519 ; ZVFHMIN-LABEL: vfcopysign_vf_nxv4f16:
521 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
522 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m2, ta, ma
523 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
524 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
525 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
526 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
527 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
528 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
529 ; ZVFHMIN-NEXT: vfsgnj.vv v10, v10, v12
530 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
531 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
533 %head = insertelement <vscale x 4 x half> poison, half %s, i32 0
534 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
535 %r = call <vscale x 4 x half> @llvm.copysign.nxv4f16(<vscale x 4 x half> %vm, <vscale x 4 x half> %splat)
536 ret <vscale x 4 x half> %r
539 define <vscale x 4 x half> @vfcopynsign_vv_nxv4f16(<vscale x 4 x half> %vm, <vscale x 4 x half> %vs) {
540 ; ZVFH-LABEL: vfcopynsign_vv_nxv4f16:
542 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
543 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v9
546 ; ZVFHMIN-LABEL: vfcopynsign_vv_nxv4f16:
548 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
549 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
550 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
551 ; ZVFHMIN-NEXT: vfneg.v v10, v10
552 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
553 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
554 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
555 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
556 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
557 ; ZVFHMIN-NEXT: vfsgnj.vv v10, v10, v12
558 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
559 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
561 %n = fneg <vscale x 4 x half> %vs
562 %r = call <vscale x 4 x half> @llvm.copysign.nxv4f16(<vscale x 4 x half> %vm, <vscale x 4 x half> %n)
563 ret <vscale x 4 x half> %r
566 define <vscale x 4 x half> @vfcopynsign_vf_nxv4f16(<vscale x 4 x half> %vm, half %s) {
567 ; ZVFH-LABEL: vfcopynsign_vf_nxv4f16:
569 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
570 ; ZVFH-NEXT: vfsgnjn.vf v8, v8, fa0
573 ; ZVFHMIN-LABEL: vfcopynsign_vf_nxv4f16:
575 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
576 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m2, ta, ma
577 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
578 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
579 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
580 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
581 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
582 ; ZVFHMIN-NEXT: vfneg.v v10, v10
583 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
584 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
585 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
586 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
587 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
588 ; ZVFHMIN-NEXT: vfsgnj.vv v10, v10, v12
589 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
590 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
592 %head = insertelement <vscale x 4 x half> poison, half %s, i32 0
593 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
594 %n = fneg <vscale x 4 x half> %splat
595 %r = call <vscale x 4 x half> @llvm.copysign.nxv4f16(<vscale x 4 x half> %vm, <vscale x 4 x half> %n)
596 ret <vscale x 4 x half> %r
599 declare <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>)
601 define <vscale x 8 x half> @vfcopysign_vv_nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %vs) {
602 ; ZVFH-LABEL: vfcopysign_vv_nxv8f16:
604 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
605 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v10
608 ; ZVFHMIN-LABEL: vfcopysign_vv_nxv8f16:
610 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
611 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
612 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
613 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
614 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v16, v12
615 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
616 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
618 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %vs)
619 ret <vscale x 8 x half> %r
622 define <vscale x 8 x half> @vfcopysign_vf_nxv8f16(<vscale x 8 x half> %vm, half %s) {
623 ; ZVFH-LABEL: vfcopysign_vf_nxv8f16:
625 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
626 ; ZVFH-NEXT: vfsgnj.vf v8, v8, fa0
629 ; ZVFHMIN-LABEL: vfcopysign_vf_nxv8f16:
631 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
632 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
633 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
634 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
635 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
636 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
637 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
638 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
639 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v12, v16
640 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
641 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
643 %head = insertelement <vscale x 8 x half> poison, half %s, i32 0
644 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
645 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %splat)
646 ret <vscale x 8 x half> %r
649 define <vscale x 8 x half> @vfcopynsign_vv_nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %vs) {
650 ; ZVFH-LABEL: vfcopynsign_vv_nxv8f16:
652 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
653 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v10
656 ; ZVFHMIN-LABEL: vfcopynsign_vv_nxv8f16:
658 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
659 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
660 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
661 ; ZVFHMIN-NEXT: vfneg.v v12, v12
662 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
663 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
664 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
665 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
666 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
667 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v12, v16
668 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
669 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
671 %n = fneg <vscale x 8 x half> %vs
672 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %n)
673 ret <vscale x 8 x half> %r
676 define <vscale x 8 x half> @vfcopynsign_vf_nxv8f16(<vscale x 8 x half> %vm, half %s) {
677 ; ZVFH-LABEL: vfcopynsign_vf_nxv8f16:
679 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
680 ; ZVFH-NEXT: vfsgnjn.vf v8, v8, fa0
683 ; ZVFHMIN-LABEL: vfcopynsign_vf_nxv8f16:
685 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
686 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
687 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
688 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
689 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
690 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
691 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
692 ; ZVFHMIN-NEXT: vfneg.v v12, v12
693 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
694 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
695 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
696 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
697 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
698 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v12, v16
699 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
700 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
702 %head = insertelement <vscale x 8 x half> poison, half %s, i32 0
703 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
704 %n = fneg <vscale x 8 x half> %splat
705 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %n)
706 ret <vscale x 8 x half> %r
709 define <vscale x 8 x half> @vfcopysign_exttrunc_vv_nxv8f16_nxv8f32(<vscale x 8 x half> %vm, <vscale x 8 x float> %vs) {
710 ; ZVFH-LABEL: vfcopysign_exttrunc_vv_nxv8f16_nxv8f32:
712 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
713 ; ZVFH-NEXT: vfncvt.f.f.w v10, v12
714 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v10
717 ; ZVFHMIN-LABEL: vfcopysign_exttrunc_vv_nxv8f16_nxv8f32:
719 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
720 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
721 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
722 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
723 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
724 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v12, v16
725 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
726 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
728 %e = fptrunc <vscale x 8 x float> %vs to <vscale x 8 x half>
729 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %e)
730 ret <vscale x 8 x half> %r
733 define <vscale x 8 x half> @vfcopysign_exttrunc_vf_nxv8f16_nxv8f32(<vscale x 8 x half> %vm, float %s) {
734 ; ZVFH-LABEL: vfcopysign_exttrunc_vf_nxv8f16_nxv8f32:
736 ; ZVFH-NEXT: vsetvli a0, zero, e32, m4, ta, ma
737 ; ZVFH-NEXT: vfmv.v.f v12, fa0
738 ; ZVFH-NEXT: vsetvli zero, zero, e16, m2, ta, ma
739 ; ZVFH-NEXT: vfncvt.f.f.w v10, v12
740 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v10
743 ; ZVFHMIN-LABEL: vfcopysign_exttrunc_vf_nxv8f16_nxv8f32:
745 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
746 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa0
747 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
748 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
749 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
750 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
751 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
752 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v12, v16
753 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
754 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
756 %head = insertelement <vscale x 8 x float> poison, float %s, i32 0
757 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
758 %esplat = fptrunc <vscale x 8 x float> %splat to <vscale x 8 x half>
759 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %esplat)
760 ret <vscale x 8 x half> %r
763 define <vscale x 8 x half> @vfcopynsign_exttrunc_vv_nxv8f16_nxv8f32(<vscale x 8 x half> %vm, <vscale x 8 x float> %vs) {
764 ; ZVFH-LABEL: vfcopynsign_exttrunc_vv_nxv8f16_nxv8f32:
766 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
767 ; ZVFH-NEXT: vfncvt.f.f.w v10, v12
768 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v10
771 ; ZVFHMIN-LABEL: vfcopynsign_exttrunc_vv_nxv8f16_nxv8f32:
773 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
774 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
775 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
776 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
777 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
778 ; ZVFHMIN-NEXT: vfneg.v v8, v12
779 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
780 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v8
781 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v12
782 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
783 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v16, v8
784 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
785 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
787 %n = fneg <vscale x 8 x float> %vs
788 %eneg = fptrunc <vscale x 8 x float> %n to <vscale x 8 x half>
789 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %eneg)
790 ret <vscale x 8 x half> %r
793 define <vscale x 8 x half> @vfcopynsign_exttrunc_vf_nxv8f16_nxv8f32(<vscale x 8 x half> %vm, float %s) {
794 ; ZVFH-LABEL: vfcopynsign_exttrunc_vf_nxv8f16_nxv8f32:
796 ; ZVFH-NEXT: vsetvli a0, zero, e32, m4, ta, ma
797 ; ZVFH-NEXT: vfmv.v.f v12, fa0
798 ; ZVFH-NEXT: vsetvli zero, zero, e16, m2, ta, ma
799 ; ZVFH-NEXT: vfncvt.f.f.w v10, v12
800 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v10
803 ; ZVFHMIN-LABEL: vfcopynsign_exttrunc_vf_nxv8f16_nxv8f32:
805 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
806 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa0
807 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
808 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
809 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
810 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
811 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
812 ; ZVFHMIN-NEXT: vfneg.v v8, v12
813 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
814 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v8
815 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v12
816 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
817 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v16, v8
818 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
819 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
821 %head = insertelement <vscale x 8 x float> poison, float %s, i32 0
822 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
823 %n = fneg <vscale x 8 x float> %splat
824 %eneg = fptrunc <vscale x 8 x float> %n to <vscale x 8 x half>
825 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %eneg)
826 ret <vscale x 8 x half> %r
829 define <vscale x 8 x half> @vfcopysign_exttrunc_vv_nxv8f16_nxv8f64(<vscale x 8 x half> %vm, <vscale x 8 x double> %vs) {
830 ; ZVFH-LABEL: vfcopysign_exttrunc_vv_nxv8f16_nxv8f64:
832 ; ZVFH-NEXT: vsetvli a0, zero, e32, m4, ta, ma
833 ; ZVFH-NEXT: vfncvt.rod.f.f.w v12, v16
834 ; ZVFH-NEXT: vsetvli zero, zero, e16, m2, ta, ma
835 ; ZVFH-NEXT: vfncvt.f.f.w v10, v12
836 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v10
839 ; ZVFHMIN-LABEL: vfcopysign_exttrunc_vv_nxv8f16_nxv8f64:
841 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
842 ; ZVFHMIN-NEXT: vfncvt.rod.f.f.w v12, v16
843 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
844 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
845 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
846 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
847 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
848 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v12, v16
849 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
850 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
852 %e = fptrunc <vscale x 8 x double> %vs to <vscale x 8 x half>
853 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %e)
854 ret <vscale x 8 x half> %r
857 define <vscale x 8 x half> @vfcopysign_exttrunc_vf_nxv8f16_nxv8f64(<vscale x 8 x half> %vm, double %s) {
858 ; ZVFH-LABEL: vfcopysign_exttrunc_vf_nxv8f16_nxv8f64:
860 ; ZVFH-NEXT: vsetvli a0, zero, e64, m8, ta, ma
861 ; ZVFH-NEXT: vfmv.v.f v16, fa0
862 ; ZVFH-NEXT: vsetvli zero, zero, e32, m4, ta, ma
863 ; ZVFH-NEXT: vfncvt.rod.f.f.w v12, v16
864 ; ZVFH-NEXT: vsetvli zero, zero, e16, m2, ta, ma
865 ; ZVFH-NEXT: vfncvt.f.f.w v10, v12
866 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v10
869 ; ZVFHMIN-LABEL: vfcopysign_exttrunc_vf_nxv8f16_nxv8f64:
871 ; ZVFHMIN-NEXT: vsetvli a0, zero, e64, m8, ta, ma
872 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa0
873 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
874 ; ZVFHMIN-NEXT: vfncvt.rod.f.f.w v12, v16
875 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
876 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
877 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
878 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
879 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
880 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v12, v16
881 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
882 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
884 %head = insertelement <vscale x 8 x double> poison, double %s, i32 0
885 %splat = shufflevector <vscale x 8 x double> %head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
886 %esplat = fptrunc <vscale x 8 x double> %splat to <vscale x 8 x half>
887 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %esplat)
888 ret <vscale x 8 x half> %r
891 define <vscale x 8 x half> @vfcopynsign_exttrunc_vv_nxv8f16_nxv8f64(<vscale x 8 x half> %vm, <vscale x 8 x double> %vs) {
892 ; ZVFH-LABEL: vfcopynsign_exttrunc_vv_nxv8f16_nxv8f64:
894 ; ZVFH-NEXT: vsetvli a0, zero, e32, m4, ta, ma
895 ; ZVFH-NEXT: vfncvt.rod.f.f.w v12, v16
896 ; ZVFH-NEXT: vsetvli zero, zero, e16, m2, ta, ma
897 ; ZVFH-NEXT: vfncvt.f.f.w v10, v12
898 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v10
901 ; ZVFHMIN-LABEL: vfcopynsign_exttrunc_vv_nxv8f16_nxv8f64:
903 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
904 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
905 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
906 ; ZVFHMIN-NEXT: vfncvt.rod.f.f.w v8, v16
907 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
908 ; ZVFHMIN-NEXT: vfncvt.f.f.w v16, v8
909 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v16
910 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
911 ; ZVFHMIN-NEXT: vfneg.v v8, v8
912 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
913 ; ZVFHMIN-NEXT: vfncvt.f.f.w v16, v8
914 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v16
915 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
916 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v12, v8
917 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
918 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
920 %n = fneg <vscale x 8 x double> %vs
921 %eneg = fptrunc <vscale x 8 x double> %n to <vscale x 8 x half>
922 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %eneg)
923 ret <vscale x 8 x half> %r
926 define <vscale x 8 x half> @vfcopynsign_exttrunc_vf_nxv8f16_nxv8f64(<vscale x 8 x half> %vm, double %s) {
927 ; ZVFH-LABEL: vfcopynsign_exttrunc_vf_nxv8f16_nxv8f64:
929 ; ZVFH-NEXT: vsetvli a0, zero, e64, m8, ta, ma
930 ; ZVFH-NEXT: vfmv.v.f v16, fa0
931 ; ZVFH-NEXT: vsetvli zero, zero, e32, m4, ta, ma
932 ; ZVFH-NEXT: vfncvt.rod.f.f.w v12, v16
933 ; ZVFH-NEXT: vsetvli zero, zero, e16, m2, ta, ma
934 ; ZVFH-NEXT: vfncvt.f.f.w v10, v12
935 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v10
938 ; ZVFHMIN-LABEL: vfcopynsign_exttrunc_vf_nxv8f16_nxv8f64:
940 ; ZVFHMIN-NEXT: vsetvli a0, zero, e64, m8, ta, ma
941 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa0
942 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
943 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
944 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
945 ; ZVFHMIN-NEXT: vfncvt.rod.f.f.w v8, v16
946 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
947 ; ZVFHMIN-NEXT: vfncvt.f.f.w v16, v8
948 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v16
949 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
950 ; ZVFHMIN-NEXT: vfneg.v v8, v8
951 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
952 ; ZVFHMIN-NEXT: vfncvt.f.f.w v16, v8
953 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v16
954 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
955 ; ZVFHMIN-NEXT: vfsgnj.vv v12, v12, v8
956 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
957 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
959 %head = insertelement <vscale x 8 x double> poison, double %s, i32 0
960 %splat = shufflevector <vscale x 8 x double> %head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
961 %n = fneg <vscale x 8 x double> %splat
962 %eneg = fptrunc <vscale x 8 x double> %n to <vscale x 8 x half>
963 %r = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> %vm, <vscale x 8 x half> %eneg)
964 ret <vscale x 8 x half> %r
967 declare <vscale x 16 x half> @llvm.copysign.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>)
969 define <vscale x 16 x half> @vfcopysign_vv_nxv16f16(<vscale x 16 x half> %vm, <vscale x 16 x half> %vs) {
970 ; ZVFH-LABEL: vfcopysign_vv_nxv16f16:
972 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
973 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v12
976 ; ZVFHMIN-LABEL: vfcopysign_vv_nxv16f16:
978 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
979 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
980 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
981 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
982 ; ZVFHMIN-NEXT: vfsgnj.vv v16, v24, v16
983 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
984 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
986 %r = call <vscale x 16 x half> @llvm.copysign.nxv16f16(<vscale x 16 x half> %vm, <vscale x 16 x half> %vs)
987 ret <vscale x 16 x half> %r
990 define <vscale x 16 x half> @vfcopysign_vf_nxv16f16(<vscale x 16 x half> %vm, half %s) {
991 ; ZVFH-LABEL: vfcopysign_vf_nxv16f16:
993 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
994 ; ZVFH-NEXT: vfsgnj.vf v8, v8, fa0
997 ; ZVFHMIN-LABEL: vfcopysign_vf_nxv16f16:
999 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1000 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1001 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
1002 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1003 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1004 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1005 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
1006 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1007 ; ZVFHMIN-NEXT: vfsgnj.vv v16, v16, v24
1008 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1009 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1011 %head = insertelement <vscale x 16 x half> poison, half %s, i32 0
1012 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
1013 %r = call <vscale x 16 x half> @llvm.copysign.nxv16f16(<vscale x 16 x half> %vm, <vscale x 16 x half> %splat)
1014 ret <vscale x 16 x half> %r
1017 define <vscale x 16 x half> @vfcopynsign_vv_nxv16f16(<vscale x 16 x half> %vm, <vscale x 16 x half> %vs) {
1018 ; ZVFH-LABEL: vfcopynsign_vv_nxv16f16:
1020 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1021 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v12
1024 ; ZVFHMIN-LABEL: vfcopynsign_vv_nxv16f16:
1026 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1027 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
1028 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1029 ; ZVFHMIN-NEXT: vfneg.v v16, v16
1030 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1031 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1032 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1033 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
1034 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1035 ; ZVFHMIN-NEXT: vfsgnj.vv v16, v16, v24
1036 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1037 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1039 %n = fneg <vscale x 16 x half> %vs
1040 %r = call <vscale x 16 x half> @llvm.copysign.nxv16f16(<vscale x 16 x half> %vm, <vscale x 16 x half> %n)
1041 ret <vscale x 16 x half> %r
1044 define <vscale x 16 x half> @vfcopynsign_vf_nxv16f16(<vscale x 16 x half> %vm, half %s) {
1045 ; ZVFH-LABEL: vfcopynsign_vf_nxv16f16:
1047 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1048 ; ZVFH-NEXT: vfsgnjn.vf v8, v8, fa0
1051 ; ZVFHMIN-LABEL: vfcopynsign_vf_nxv16f16:
1053 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1054 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1055 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
1056 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1057 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1058 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
1059 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1060 ; ZVFHMIN-NEXT: vfneg.v v16, v16
1061 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1062 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1063 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1064 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
1065 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1066 ; ZVFHMIN-NEXT: vfsgnj.vv v16, v16, v24
1067 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1068 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1070 %head = insertelement <vscale x 16 x half> poison, half %s, i32 0
1071 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
1072 %n = fneg <vscale x 16 x half> %splat
1073 %r = call <vscale x 16 x half> @llvm.copysign.nxv16f16(<vscale x 16 x half> %vm, <vscale x 16 x half> %n)
1074 ret <vscale x 16 x half> %r
1077 declare <vscale x 32 x half> @llvm.copysign.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>)
1079 define <vscale x 32 x half> @vfcopysign_vv_nxv32f16(<vscale x 32 x half> %vm, <vscale x 32 x half> %vs) {
1080 ; ZVFH-LABEL: vfcopysign_vv_nxv32f16:
1082 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1083 ; ZVFH-NEXT: vfsgnj.vv v8, v8, v16
1086 ; ZVFHMIN-LABEL: vfcopysign_vv_nxv32f16:
1088 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1089 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
1090 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v8
1091 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1092 ; ZVFHMIN-NEXT: vfsgnj.vv v24, v0, v24
1093 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1094 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v24
1095 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v20
1096 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
1097 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1098 ; ZVFHMIN-NEXT: vfsgnj.vv v16, v16, v24
1099 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1100 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1102 %r = call <vscale x 32 x half> @llvm.copysign.nxv32f16(<vscale x 32 x half> %vm, <vscale x 32 x half> %vs)
1103 ret <vscale x 32 x half> %r
1106 define <vscale x 32 x half> @vfcopysign_vf_nxv32f16(<vscale x 32 x half> %vm, half %s) {
1107 ; ZVFH-LABEL: vfcopysign_vf_nxv32f16:
1109 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1110 ; ZVFH-NEXT: vfsgnj.vf v8, v8, fa0
1113 ; ZVFHMIN-LABEL: vfcopysign_vf_nxv32f16:
1115 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1116 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1117 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
1118 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1119 ; ZVFHMIN-NEXT: vfncvt.f.f.w v24, v16
1120 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1121 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v24
1122 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1123 ; ZVFHMIN-NEXT: vfsgnj.vv v16, v16, v0
1124 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1125 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1126 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
1127 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1128 ; ZVFHMIN-NEXT: vfsgnj.vv v16, v16, v0
1129 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1130 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1132 %head = insertelement <vscale x 32 x half> poison, half %s, i32 0
1133 %splat = shufflevector <vscale x 32 x half> %head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
1134 %r = call <vscale x 32 x half> @llvm.copysign.nxv32f16(<vscale x 32 x half> %vm, <vscale x 32 x half> %splat)
1135 ret <vscale x 32 x half> %r
1138 define <vscale x 32 x half> @vfcopynsign_vv_nxv32f16(<vscale x 32 x half> %vm, <vscale x 32 x half> %vs) {
1139 ; ZVFH-LABEL: vfcopynsign_vv_nxv32f16:
1141 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1142 ; ZVFH-NEXT: vfsgnjn.vv v8, v8, v16
1145 ; ZVFHMIN-LABEL: vfcopynsign_vv_nxv32f16:
1147 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1148 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v20
1149 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1150 ; ZVFHMIN-NEXT: vfneg.v v24, v24
1151 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1152 ; ZVFHMIN-NEXT: vfncvt.f.f.w v20, v24
1153 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
1154 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1155 ; ZVFHMIN-NEXT: vfneg.v v24, v24
1156 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1157 ; ZVFHMIN-NEXT: vfncvt.f.f.w v16, v24
1158 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
1159 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v16
1160 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1161 ; ZVFHMIN-NEXT: vfsgnj.vv v24, v24, v0
1162 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1163 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v24
1164 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
1165 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v20
1166 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1167 ; ZVFHMIN-NEXT: vfsgnj.vv v16, v24, v0
1168 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1169 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1171 %n = fneg <vscale x 32 x half> %vs
1172 %r = call <vscale x 32 x half> @llvm.copysign.nxv32f16(<vscale x 32 x half> %vm, <vscale x 32 x half> %n)
1173 ret <vscale x 32 x half> %r
1176 define <vscale x 32 x half> @vfcopynsign_vf_nxv32f16(<vscale x 32 x half> %vm, half %s) {
1177 ; ZVFH-LABEL: vfcopynsign_vf_nxv32f16:
1179 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1180 ; ZVFH-NEXT: vfsgnjn.vf v8, v8, fa0
1183 ; ZVFHMIN-LABEL: vfcopynsign_vf_nxv32f16:
1185 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1186 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1187 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
1188 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1189 ; ZVFHMIN-NEXT: vfncvt.f.f.w v24, v16
1190 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v24
1191 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1192 ; ZVFHMIN-NEXT: vfneg.v v16, v16
1193 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1194 ; ZVFHMIN-NEXT: vfncvt.f.f.w v24, v16
1195 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1196 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v24
1197 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1198 ; ZVFHMIN-NEXT: vfsgnj.vv v16, v16, v0
1199 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1200 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1201 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
1202 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1203 ; ZVFHMIN-NEXT: vfsgnj.vv v16, v16, v0
1204 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1205 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1207 %head = insertelement <vscale x 32 x half> poison, half %s, i32 0
1208 %splat = shufflevector <vscale x 32 x half> %head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
1209 %n = fneg <vscale x 32 x half> %splat
1210 %r = call <vscale x 32 x half> @llvm.copysign.nxv32f16(<vscale x 32 x half> %vm, <vscale x 32 x half> %n)
1211 ret <vscale x 32 x half> %r
1214 declare <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>)
1216 define <vscale x 1 x float> @vfcopysign_vv_nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %vs) {
1217 ; CHECK-LABEL: vfcopysign_vv_nxv1f32:
1219 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1220 ; CHECK-NEXT: vfsgnj.vv v8, v8, v9
1222 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %vs)
1223 ret <vscale x 1 x float> %r
1226 define <vscale x 1 x float> @vfcopysign_vf_nxv1f32(<vscale x 1 x float> %vm, float %s) {
1227 ; CHECK-LABEL: vfcopysign_vf_nxv1f32:
1229 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1230 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa0
1232 %head = insertelement <vscale x 1 x float> poison, float %s, i32 0
1233 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
1234 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %splat)
1235 ret <vscale x 1 x float> %r
1238 define <vscale x 1 x float> @vfcopynsign_vv_nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %vs) {
1239 ; CHECK-LABEL: vfcopynsign_vv_nxv1f32:
1241 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1242 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v9
1244 %n = fneg <vscale x 1 x float> %vs
1245 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %n)
1246 ret <vscale x 1 x float> %r
1249 define <vscale x 1 x float> @vfcopynsign_vf_nxv1f32(<vscale x 1 x float> %vm, float %s) {
1250 ; CHECK-LABEL: vfcopynsign_vf_nxv1f32:
1252 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1253 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa0
1255 %head = insertelement <vscale x 1 x float> poison, float %s, i32 0
1256 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
1257 %n = fneg <vscale x 1 x float> %splat
1258 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %n)
1259 ret <vscale x 1 x float> %r
1262 define <vscale x 1 x float> @vfcopysign_exttrunc_vv_nxv1f32_nxv1f16(<vscale x 1 x float> %vm, <vscale x 1 x half> %vs) {
1263 ; CHECK-LABEL: vfcopysign_exttrunc_vv_nxv1f32_nxv1f16:
1265 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1266 ; CHECK-NEXT: vfwcvt.f.f.v v10, v9
1267 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1268 ; CHECK-NEXT: vfsgnj.vv v8, v8, v10
1270 %e = fpext <vscale x 1 x half> %vs to <vscale x 1 x float>
1271 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %e)
1272 ret <vscale x 1 x float> %r
1275 define <vscale x 1 x float> @vfcopysign_exttrunc_vf_nxv1f32_nxv1f16(<vscale x 1 x float> %vm, half %s) {
1276 ; CHECK-LABEL: vfcopysign_exttrunc_vf_nxv1f32_nxv1f16:
1278 ; CHECK-NEXT: fcvt.s.h fa5, fa0
1279 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1280 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa5
1282 %head = insertelement <vscale x 1 x half> poison, half %s, i32 0
1283 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
1284 %esplat = fpext <vscale x 1 x half> %splat to <vscale x 1 x float>
1285 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %esplat)
1286 ret <vscale x 1 x float> %r
1289 define <vscale x 1 x float> @vfcopynsign_exttrunc_vv_nxv1f32_nxv1f16(<vscale x 1 x float> %vm, <vscale x 1 x half> %vs) {
1290 ; CHECK-LABEL: vfcopynsign_exttrunc_vv_nxv1f32_nxv1f16:
1292 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1293 ; CHECK-NEXT: vfwcvt.f.f.v v10, v9
1294 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1295 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v10
1297 %n = fneg <vscale x 1 x half> %vs
1298 %eneg = fpext <vscale x 1 x half> %n to <vscale x 1 x float>
1299 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %eneg)
1300 ret <vscale x 1 x float> %r
1303 define <vscale x 1 x float> @vfcopynsign_exttrunc_vf_nxv1f32_nxv1f16(<vscale x 1 x float> %vm, half %s) {
1304 ; CHECK-LABEL: vfcopynsign_exttrunc_vf_nxv1f32_nxv1f16:
1306 ; CHECK-NEXT: fcvt.s.h fa5, fa0
1307 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1308 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa5
1310 %head = insertelement <vscale x 1 x half> poison, half %s, i32 0
1311 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
1312 %n = fneg <vscale x 1 x half> %splat
1313 %eneg = fpext <vscale x 1 x half> %n to <vscale x 1 x float>
1314 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %eneg)
1315 ret <vscale x 1 x float> %r
1318 define <vscale x 1 x float> @vfcopysign_exttrunc_vv_nxv1f32_nxv1f64(<vscale x 1 x float> %vm, <vscale x 1 x double> %vs) {
1319 ; CHECK-LABEL: vfcopysign_exttrunc_vv_nxv1f32_nxv1f64:
1321 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1322 ; CHECK-NEXT: vfncvt.f.f.w v10, v9
1323 ; CHECK-NEXT: vfsgnj.vv v8, v8, v10
1325 %e = fptrunc <vscale x 1 x double> %vs to <vscale x 1 x float>
1326 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %e)
1327 ret <vscale x 1 x float> %r
1330 define <vscale x 1 x float> @vfcopysign_exttrunc_vf_nxv1f32_nxv1f64(<vscale x 1 x float> %vm, double %s) {
1331 ; CHECK-LABEL: vfcopysign_exttrunc_vf_nxv1f32_nxv1f64:
1333 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1334 ; CHECK-NEXT: vfmv.v.f v9, fa0
1335 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1336 ; CHECK-NEXT: vfncvt.f.f.w v10, v9
1337 ; CHECK-NEXT: vfsgnj.vv v8, v8, v10
1339 %head = insertelement <vscale x 1 x double> poison, double %s, i32 0
1340 %splat = shufflevector <vscale x 1 x double> %head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1341 %esplat = fptrunc <vscale x 1 x double> %splat to <vscale x 1 x float>
1342 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %esplat)
1343 ret <vscale x 1 x float> %r
1346 define <vscale x 1 x float> @vfcopynsign_exttrunc_vv_nxv1f32_nxv1f64(<vscale x 1 x float> %vm, <vscale x 1 x double> %vs) {
1347 ; CHECK-LABEL: vfcopynsign_exttrunc_vv_nxv1f32_nxv1f64:
1349 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1350 ; CHECK-NEXT: vfncvt.f.f.w v10, v9
1351 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v10
1353 %n = fneg <vscale x 1 x double> %vs
1354 %eneg = fptrunc <vscale x 1 x double> %n to <vscale x 1 x float>
1355 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %eneg)
1356 ret <vscale x 1 x float> %r
1359 define <vscale x 1 x float> @vfcopynsign_exttrunc_vf_nxv1f32_nxv1f64(<vscale x 1 x float> %vm, double %s) {
1360 ; CHECK-LABEL: vfcopynsign_exttrunc_vf_nxv1f32_nxv1f64:
1362 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1363 ; CHECK-NEXT: vfmv.v.f v9, fa0
1364 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1365 ; CHECK-NEXT: vfncvt.f.f.w v10, v9
1366 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v10
1368 %head = insertelement <vscale x 1 x double> poison, double %s, i32 0
1369 %splat = shufflevector <vscale x 1 x double> %head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1370 %n = fneg <vscale x 1 x double> %splat
1371 %eneg = fptrunc <vscale x 1 x double> %n to <vscale x 1 x float>
1372 %r = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> %vm, <vscale x 1 x float> %eneg)
1373 ret <vscale x 1 x float> %r
1376 declare <vscale x 2 x float> @llvm.copysign.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>)
1378 define <vscale x 2 x float> @vfcopysign_vv_nxv2f32(<vscale x 2 x float> %vm, <vscale x 2 x float> %vs) {
1379 ; CHECK-LABEL: vfcopysign_vv_nxv2f32:
1381 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1382 ; CHECK-NEXT: vfsgnj.vv v8, v8, v9
1384 %r = call <vscale x 2 x float> @llvm.copysign.nxv2f32(<vscale x 2 x float> %vm, <vscale x 2 x float> %vs)
1385 ret <vscale x 2 x float> %r
1388 define <vscale x 2 x float> @vfcopysign_vf_nxv2f32(<vscale x 2 x float> %vm, float %s) {
1389 ; CHECK-LABEL: vfcopysign_vf_nxv2f32:
1391 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1392 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa0
1394 %head = insertelement <vscale x 2 x float> poison, float %s, i32 0
1395 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1396 %r = call <vscale x 2 x float> @llvm.copysign.nxv2f32(<vscale x 2 x float> %vm, <vscale x 2 x float> %splat)
1397 ret <vscale x 2 x float> %r
1400 define <vscale x 2 x float> @vfcopynsign_vv_nxv2f32(<vscale x 2 x float> %vm, <vscale x 2 x float> %vs) {
1401 ; CHECK-LABEL: vfcopynsign_vv_nxv2f32:
1403 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1404 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v9
1406 %n = fneg <vscale x 2 x float> %vs
1407 %r = call <vscale x 2 x float> @llvm.copysign.nxv2f32(<vscale x 2 x float> %vm, <vscale x 2 x float> %n)
1408 ret <vscale x 2 x float> %r
1411 define <vscale x 2 x float> @vfcopynsign_vf_nxv2f32(<vscale x 2 x float> %vm, float %s) {
1412 ; CHECK-LABEL: vfcopynsign_vf_nxv2f32:
1414 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1415 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa0
1417 %head = insertelement <vscale x 2 x float> poison, float %s, i32 0
1418 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1419 %n = fneg <vscale x 2 x float> %splat
1420 %r = call <vscale x 2 x float> @llvm.copysign.nxv2f32(<vscale x 2 x float> %vm, <vscale x 2 x float> %n)
1421 ret <vscale x 2 x float> %r
1424 declare <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>)
1426 define <vscale x 4 x float> @vfcopysign_vv_nxv4f32(<vscale x 4 x float> %vm, <vscale x 4 x float> %vs) {
1427 ; CHECK-LABEL: vfcopysign_vv_nxv4f32:
1429 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1430 ; CHECK-NEXT: vfsgnj.vv v8, v8, v10
1432 %r = call <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float> %vm, <vscale x 4 x float> %vs)
1433 ret <vscale x 4 x float> %r
1436 define <vscale x 4 x float> @vfcopysign_vf_nxv4f32(<vscale x 4 x float> %vm, float %s) {
1437 ; CHECK-LABEL: vfcopysign_vf_nxv4f32:
1439 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1440 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa0
1442 %head = insertelement <vscale x 4 x float> poison, float %s, i32 0
1443 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1444 %r = call <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float> %vm, <vscale x 4 x float> %splat)
1445 ret <vscale x 4 x float> %r
1448 define <vscale x 4 x float> @vfcopynsign_vv_nxv4f32(<vscale x 4 x float> %vm, <vscale x 4 x float> %vs) {
1449 ; CHECK-LABEL: vfcopynsign_vv_nxv4f32:
1451 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1452 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v10
1454 %n = fneg <vscale x 4 x float> %vs
1455 %r = call <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float> %vm, <vscale x 4 x float> %n)
1456 ret <vscale x 4 x float> %r
1459 define <vscale x 4 x float> @vfcopynsign_vf_nxv4f32(<vscale x 4 x float> %vm, float %s) {
1460 ; CHECK-LABEL: vfcopynsign_vf_nxv4f32:
1462 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1463 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa0
1465 %head = insertelement <vscale x 4 x float> poison, float %s, i32 0
1466 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1467 %n = fneg <vscale x 4 x float> %splat
1468 %r = call <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float> %vm, <vscale x 4 x float> %n)
1469 ret <vscale x 4 x float> %r
1472 declare <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>)
1474 define <vscale x 8 x float> @vfcopysign_vv_nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %vs) {
1475 ; CHECK-LABEL: vfcopysign_vv_nxv8f32:
1477 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1478 ; CHECK-NEXT: vfsgnj.vv v8, v8, v12
1480 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %vs)
1481 ret <vscale x 8 x float> %r
1484 define <vscale x 8 x float> @vfcopysign_vf_nxv8f32(<vscale x 8 x float> %vm, float %s) {
1485 ; CHECK-LABEL: vfcopysign_vf_nxv8f32:
1487 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1488 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa0
1490 %head = insertelement <vscale x 8 x float> poison, float %s, i32 0
1491 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1492 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %splat)
1493 ret <vscale x 8 x float> %r
1496 define <vscale x 8 x float> @vfcopynsign_vv_nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %vs) {
1497 ; CHECK-LABEL: vfcopynsign_vv_nxv8f32:
1499 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1500 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v12
1502 %n = fneg <vscale x 8 x float> %vs
1503 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %n)
1504 ret <vscale x 8 x float> %r
1507 define <vscale x 8 x float> @vfcopynsign_vf_nxv8f32(<vscale x 8 x float> %vm, float %s) {
1508 ; CHECK-LABEL: vfcopynsign_vf_nxv8f32:
1510 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1511 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa0
1513 %head = insertelement <vscale x 8 x float> poison, float %s, i32 0
1514 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1515 %n = fneg <vscale x 8 x float> %splat
1516 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %n)
1517 ret <vscale x 8 x float> %r
1520 define <vscale x 8 x float> @vfcopysign_exttrunc_vv_nxv8f32_nxv8f16(<vscale x 8 x float> %vm, <vscale x 8 x half> %vs) {
1521 ; CHECK-LABEL: vfcopysign_exttrunc_vv_nxv8f32_nxv8f16:
1523 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1524 ; CHECK-NEXT: vfwcvt.f.f.v v16, v12
1525 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
1526 ; CHECK-NEXT: vfsgnj.vv v8, v8, v16
1528 %e = fpext <vscale x 8 x half> %vs to <vscale x 8 x float>
1529 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %e)
1530 ret <vscale x 8 x float> %r
1533 define <vscale x 8 x float> @vfcopysign_exttrunc_vf_nxv8f32_nxv8f16(<vscale x 8 x float> %vm, half %s) {
1534 ; CHECK-LABEL: vfcopysign_exttrunc_vf_nxv8f32_nxv8f16:
1536 ; CHECK-NEXT: fcvt.s.h fa5, fa0
1537 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1538 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa5
1540 %head = insertelement <vscale x 8 x half> poison, half %s, i32 0
1541 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
1542 %esplat = fpext <vscale x 8 x half> %splat to <vscale x 8 x float>
1543 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %esplat)
1544 ret <vscale x 8 x float> %r
1547 define <vscale x 8 x float> @vfcopynsign_exttrunc_vv_nxv8f32_nxv8f16(<vscale x 8 x float> %vm, <vscale x 8 x half> %vs) {
1548 ; CHECK-LABEL: vfcopynsign_exttrunc_vv_nxv8f32_nxv8f16:
1550 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1551 ; CHECK-NEXT: vfwcvt.f.f.v v16, v12
1552 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
1553 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v16
1555 %n = fneg <vscale x 8 x half> %vs
1556 %eneg = fpext <vscale x 8 x half> %n to <vscale x 8 x float>
1557 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %eneg)
1558 ret <vscale x 8 x float> %r
1561 define <vscale x 8 x float> @vfcopynsign_exttrunc_vf_nxv8f32_nxv8f16(<vscale x 8 x float> %vm, half %s) {
1562 ; CHECK-LABEL: vfcopynsign_exttrunc_vf_nxv8f32_nxv8f16:
1564 ; CHECK-NEXT: fcvt.s.h fa5, fa0
1565 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1566 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa5
1568 %head = insertelement <vscale x 8 x half> poison, half %s, i32 0
1569 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
1570 %n = fneg <vscale x 8 x half> %splat
1571 %eneg = fpext <vscale x 8 x half> %n to <vscale x 8 x float>
1572 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %eneg)
1573 ret <vscale x 8 x float> %r
1576 define <vscale x 8 x float> @vfcopysign_exttrunc_vv_nxv8f32_nxv8f64(<vscale x 8 x float> %vm, <vscale x 8 x double> %vs) {
1577 ; CHECK-LABEL: vfcopysign_exttrunc_vv_nxv8f32_nxv8f64:
1579 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1580 ; CHECK-NEXT: vfncvt.f.f.w v12, v16
1581 ; CHECK-NEXT: vfsgnj.vv v8, v8, v12
1583 %e = fptrunc <vscale x 8 x double> %vs to <vscale x 8 x float>
1584 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %e)
1585 ret <vscale x 8 x float> %r
1588 define <vscale x 8 x float> @vfcopysign_exttrunc_vf_nxv8f32_nxv8f64(<vscale x 8 x float> %vm, double %s) {
1589 ; CHECK-LABEL: vfcopysign_exttrunc_vf_nxv8f32_nxv8f64:
1591 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1592 ; CHECK-NEXT: vfmv.v.f v16, fa0
1593 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
1594 ; CHECK-NEXT: vfncvt.f.f.w v12, v16
1595 ; CHECK-NEXT: vfsgnj.vv v8, v8, v12
1597 %head = insertelement <vscale x 8 x double> poison, double %s, i32 0
1598 %splat = shufflevector <vscale x 8 x double> %head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1599 %esplat = fptrunc <vscale x 8 x double> %splat to <vscale x 8 x float>
1600 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %esplat)
1601 ret <vscale x 8 x float> %r
1604 define <vscale x 8 x float> @vfcopynsign_exttrunc_vv_nxv8f32_nxv8f64(<vscale x 8 x float> %vm, <vscale x 8 x double> %vs) {
1605 ; CHECK-LABEL: vfcopynsign_exttrunc_vv_nxv8f32_nxv8f64:
1607 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1608 ; CHECK-NEXT: vfncvt.f.f.w v12, v16
1609 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v12
1611 %n = fneg <vscale x 8 x double> %vs
1612 %eneg = fptrunc <vscale x 8 x double> %n to <vscale x 8 x float>
1613 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %eneg)
1614 ret <vscale x 8 x float> %r
1617 define <vscale x 8 x float> @vfcopynsign_exttrunc_vf_nxv8f32_nxv8f64(<vscale x 8 x float> %vm, double %s) {
1618 ; CHECK-LABEL: vfcopynsign_exttrunc_vf_nxv8f32_nxv8f64:
1620 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1621 ; CHECK-NEXT: vfmv.v.f v16, fa0
1622 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
1623 ; CHECK-NEXT: vfncvt.f.f.w v12, v16
1624 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v12
1626 %head = insertelement <vscale x 8 x double> poison, double %s, i32 0
1627 %splat = shufflevector <vscale x 8 x double> %head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1628 %n = fneg <vscale x 8 x double> %splat
1629 %eneg = fptrunc <vscale x 8 x double> %n to <vscale x 8 x float>
1630 %r = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> %vm, <vscale x 8 x float> %eneg)
1631 ret <vscale x 8 x float> %r
1634 declare <vscale x 16 x float> @llvm.copysign.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>)
1636 define <vscale x 16 x float> @vfcopysign_vv_nxv16f32(<vscale x 16 x float> %vm, <vscale x 16 x float> %vs) {
1637 ; CHECK-LABEL: vfcopysign_vv_nxv16f32:
1639 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1640 ; CHECK-NEXT: vfsgnj.vv v8, v8, v16
1642 %r = call <vscale x 16 x float> @llvm.copysign.nxv16f32(<vscale x 16 x float> %vm, <vscale x 16 x float> %vs)
1643 ret <vscale x 16 x float> %r
1646 define <vscale x 16 x float> @vfcopysign_vf_nxv16f32(<vscale x 16 x float> %vm, float %s) {
1647 ; CHECK-LABEL: vfcopysign_vf_nxv16f32:
1649 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1650 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa0
1652 %head = insertelement <vscale x 16 x float> poison, float %s, i32 0
1653 %splat = shufflevector <vscale x 16 x float> %head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1654 %r = call <vscale x 16 x float> @llvm.copysign.nxv16f32(<vscale x 16 x float> %vm, <vscale x 16 x float> %splat)
1655 ret <vscale x 16 x float> %r
1658 define <vscale x 16 x float> @vfcopynsign_vv_nxv16f32(<vscale x 16 x float> %vm, <vscale x 16 x float> %vs) {
1659 ; CHECK-LABEL: vfcopynsign_vv_nxv16f32:
1661 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1662 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v16
1664 %n = fneg <vscale x 16 x float> %vs
1665 %r = call <vscale x 16 x float> @llvm.copysign.nxv16f32(<vscale x 16 x float> %vm, <vscale x 16 x float> %n)
1666 ret <vscale x 16 x float> %r
1669 define <vscale x 16 x float> @vfcopynsign_vf_nxv16f32(<vscale x 16 x float> %vm, float %s) {
1670 ; CHECK-LABEL: vfcopynsign_vf_nxv16f32:
1672 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1673 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa0
1675 %head = insertelement <vscale x 16 x float> poison, float %s, i32 0
1676 %splat = shufflevector <vscale x 16 x float> %head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1677 %n = fneg <vscale x 16 x float> %splat
1678 %r = call <vscale x 16 x float> @llvm.copysign.nxv16f32(<vscale x 16 x float> %vm, <vscale x 16 x float> %n)
1679 ret <vscale x 16 x float> %r
1682 declare <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>)
1684 define <vscale x 1 x double> @vfcopysign_vv_nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %vs) {
1685 ; CHECK-LABEL: vfcopysign_vv_nxv1f64:
1687 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1688 ; CHECK-NEXT: vfsgnj.vv v8, v8, v9
1690 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %vs)
1691 ret <vscale x 1 x double> %r
1694 define <vscale x 1 x double> @vfcopysign_vf_nxv1f64(<vscale x 1 x double> %vm, double %s) {
1695 ; CHECK-LABEL: vfcopysign_vf_nxv1f64:
1697 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1698 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa0
1700 %head = insertelement <vscale x 1 x double> poison, double %s, i32 0
1701 %splat = shufflevector <vscale x 1 x double> %head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1702 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %splat)
1703 ret <vscale x 1 x double> %r
1706 define <vscale x 1 x double> @vfcopynsign_vv_nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %vs) {
1707 ; CHECK-LABEL: vfcopynsign_vv_nxv1f64:
1709 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1710 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v9
1712 %n = fneg <vscale x 1 x double> %vs
1713 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %n)
1714 ret <vscale x 1 x double> %r
1717 define <vscale x 1 x double> @vfcopynsign_vf_nxv1f64(<vscale x 1 x double> %vm, double %s) {
1718 ; CHECK-LABEL: vfcopynsign_vf_nxv1f64:
1720 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1721 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa0
1723 %head = insertelement <vscale x 1 x double> poison, double %s, i32 0
1724 %splat = shufflevector <vscale x 1 x double> %head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1725 %n = fneg <vscale x 1 x double> %splat
1726 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %n)
1727 ret <vscale x 1 x double> %r
1730 define <vscale x 1 x double> @vfcopysign_exttrunc_vv_nxv1f64_nxv1f16(<vscale x 1 x double> %vm, <vscale x 1 x half> %vs) {
1731 ; CHECK-LABEL: vfcopysign_exttrunc_vv_nxv1f64_nxv1f16:
1733 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1734 ; CHECK-NEXT: vfwcvt.f.f.v v10, v9
1735 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1736 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1737 ; CHECK-NEXT: vsetvli zero, zero, e64, m1, ta, ma
1738 ; CHECK-NEXT: vfsgnj.vv v8, v8, v9
1740 %e = fpext <vscale x 1 x half> %vs to <vscale x 1 x double>
1741 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %e)
1742 ret <vscale x 1 x double> %r
1745 define <vscale x 1 x double> @vfcopysign_exttrunc_vf_nxv1f64_nxv1f16(<vscale x 1 x double> %vm, half %s) {
1746 ; CHECK-LABEL: vfcopysign_exttrunc_vf_nxv1f64_nxv1f16:
1748 ; CHECK-NEXT: fcvt.d.h fa5, fa0
1749 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1750 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa5
1752 %head = insertelement <vscale x 1 x half> poison, half %s, i32 0
1753 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
1754 %esplat = fpext <vscale x 1 x half> %splat to <vscale x 1 x double>
1755 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %esplat)
1756 ret <vscale x 1 x double> %r
1759 define <vscale x 1 x double> @vfcopynsign_exttrunc_vv_nxv1f64_nxv1f16(<vscale x 1 x double> %vm, <vscale x 1 x half> %vs) {
1760 ; CHECK-LABEL: vfcopynsign_exttrunc_vv_nxv1f64_nxv1f16:
1762 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1763 ; CHECK-NEXT: vfwcvt.f.f.v v10, v9
1764 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1765 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1766 ; CHECK-NEXT: vsetvli zero, zero, e64, m1, ta, ma
1767 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v9
1769 %n = fneg <vscale x 1 x half> %vs
1770 %eneg = fpext <vscale x 1 x half> %n to <vscale x 1 x double>
1771 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %eneg)
1772 ret <vscale x 1 x double> %r
1775 define <vscale x 1 x double> @vfcopynsign_exttrunc_vf_nxv1f64_nxv1f16(<vscale x 1 x double> %vm, half %s) {
1776 ; CHECK-LABEL: vfcopynsign_exttrunc_vf_nxv1f64_nxv1f16:
1778 ; CHECK-NEXT: fcvt.d.h fa5, fa0
1779 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1780 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa5
1782 %head = insertelement <vscale x 1 x half> poison, half %s, i32 0
1783 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
1784 %n = fneg <vscale x 1 x half> %splat
1785 %eneg = fpext <vscale x 1 x half> %n to <vscale x 1 x double>
1786 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %eneg)
1787 ret <vscale x 1 x double> %r
1790 define <vscale x 1 x double> @vfcopysign_exttrunc_vv_nxv1f64_nxv1f32(<vscale x 1 x double> %vm, <vscale x 1 x float> %vs) {
1791 ; CHECK-LABEL: vfcopysign_exttrunc_vv_nxv1f64_nxv1f32:
1793 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1794 ; CHECK-NEXT: vfwcvt.f.f.v v10, v9
1795 ; CHECK-NEXT: vsetvli zero, zero, e64, m1, ta, ma
1796 ; CHECK-NEXT: vfsgnj.vv v8, v8, v10
1798 %e = fpext <vscale x 1 x float> %vs to <vscale x 1 x double>
1799 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %e)
1800 ret <vscale x 1 x double> %r
1803 define <vscale x 1 x double> @vfcopysign_exttrunc_vf_nxv1f64_nxv1f32(<vscale x 1 x double> %vm, float %s) {
1804 ; CHECK-LABEL: vfcopysign_exttrunc_vf_nxv1f64_nxv1f32:
1806 ; CHECK-NEXT: fcvt.d.s fa5, fa0
1807 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1808 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa5
1810 %head = insertelement <vscale x 1 x float> poison, float %s, i32 0
1811 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
1812 %esplat = fpext <vscale x 1 x float> %splat to <vscale x 1 x double>
1813 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %esplat)
1814 ret <vscale x 1 x double> %r
1817 define <vscale x 1 x double> @vfcopynsign_exttrunc_vv_nxv1f64_nxv1f32(<vscale x 1 x double> %vm, <vscale x 1 x float> %vs) {
1818 ; CHECK-LABEL: vfcopynsign_exttrunc_vv_nxv1f64_nxv1f32:
1820 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1821 ; CHECK-NEXT: vfwcvt.f.f.v v10, v9
1822 ; CHECK-NEXT: vsetvli zero, zero, e64, m1, ta, ma
1823 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v10
1825 %n = fneg <vscale x 1 x float> %vs
1826 %eneg = fpext <vscale x 1 x float> %n to <vscale x 1 x double>
1827 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %eneg)
1828 ret <vscale x 1 x double> %r
1831 define <vscale x 1 x double> @vfcopynsign_exttrunc_vf_nxv1f64_nxv1f32(<vscale x 1 x double> %vm, float %s) {
1832 ; CHECK-LABEL: vfcopynsign_exttrunc_vf_nxv1f64_nxv1f32:
1834 ; CHECK-NEXT: fcvt.d.s fa5, fa0
1835 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1836 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa5
1838 %head = insertelement <vscale x 1 x float> poison, float %s, i32 0
1839 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
1840 %n = fneg <vscale x 1 x float> %splat
1841 %eneg = fpext <vscale x 1 x float> %n to <vscale x 1 x double>
1842 %r = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> %vm, <vscale x 1 x double> %eneg)
1843 ret <vscale x 1 x double> %r
1846 declare <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>)
1848 define <vscale x 2 x double> @vfcopysign_vv_nxv2f64(<vscale x 2 x double> %vm, <vscale x 2 x double> %vs) {
1849 ; CHECK-LABEL: vfcopysign_vv_nxv2f64:
1851 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1852 ; CHECK-NEXT: vfsgnj.vv v8, v8, v10
1854 %r = call <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double> %vm, <vscale x 2 x double> %vs)
1855 ret <vscale x 2 x double> %r
1858 define <vscale x 2 x double> @vfcopysign_vf_nxv2f64(<vscale x 2 x double> %vm, double %s) {
1859 ; CHECK-LABEL: vfcopysign_vf_nxv2f64:
1861 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1862 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa0
1864 %head = insertelement <vscale x 2 x double> poison, double %s, i32 0
1865 %splat = shufflevector <vscale x 2 x double> %head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1866 %r = call <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double> %vm, <vscale x 2 x double> %splat)
1867 ret <vscale x 2 x double> %r
1870 define <vscale x 2 x double> @vfcopynsign_vv_nxv2f64(<vscale x 2 x double> %vm, <vscale x 2 x double> %vs) {
1871 ; CHECK-LABEL: vfcopynsign_vv_nxv2f64:
1873 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1874 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v10
1876 %n = fneg <vscale x 2 x double> %vs
1877 %r = call <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double> %vm, <vscale x 2 x double> %n)
1878 ret <vscale x 2 x double> %r
1881 define <vscale x 2 x double> @vfcopynsign_vf_nxv2f64(<vscale x 2 x double> %vm, double %s) {
1882 ; CHECK-LABEL: vfcopynsign_vf_nxv2f64:
1884 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1885 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa0
1887 %head = insertelement <vscale x 2 x double> poison, double %s, i32 0
1888 %splat = shufflevector <vscale x 2 x double> %head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1889 %n = fneg <vscale x 2 x double> %splat
1890 %r = call <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double> %vm, <vscale x 2 x double> %n)
1891 ret <vscale x 2 x double> %r
1894 declare <vscale x 4 x double> @llvm.copysign.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>)
1896 define <vscale x 4 x double> @vfcopysign_vv_nxv4f64(<vscale x 4 x double> %vm, <vscale x 4 x double> %vs) {
1897 ; CHECK-LABEL: vfcopysign_vv_nxv4f64:
1899 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1900 ; CHECK-NEXT: vfsgnj.vv v8, v8, v12
1902 %r = call <vscale x 4 x double> @llvm.copysign.nxv4f64(<vscale x 4 x double> %vm, <vscale x 4 x double> %vs)
1903 ret <vscale x 4 x double> %r
1906 define <vscale x 4 x double> @vfcopysign_vf_nxv4f64(<vscale x 4 x double> %vm, double %s) {
1907 ; CHECK-LABEL: vfcopysign_vf_nxv4f64:
1909 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1910 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa0
1912 %head = insertelement <vscale x 4 x double> poison, double %s, i32 0
1913 %splat = shufflevector <vscale x 4 x double> %head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1914 %r = call <vscale x 4 x double> @llvm.copysign.nxv4f64(<vscale x 4 x double> %vm, <vscale x 4 x double> %splat)
1915 ret <vscale x 4 x double> %r
1918 define <vscale x 4 x double> @vfcopynsign_vv_nxv4f64(<vscale x 4 x double> %vm, <vscale x 4 x double> %vs) {
1919 ; CHECK-LABEL: vfcopynsign_vv_nxv4f64:
1921 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1922 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v12
1924 %n = fneg <vscale x 4 x double> %vs
1925 %r = call <vscale x 4 x double> @llvm.copysign.nxv4f64(<vscale x 4 x double> %vm, <vscale x 4 x double> %n)
1926 ret <vscale x 4 x double> %r
1929 define <vscale x 4 x double> @vfcopynsign_vf_nxv4f64(<vscale x 4 x double> %vm, double %s) {
1930 ; CHECK-LABEL: vfcopynsign_vf_nxv4f64:
1932 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1933 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa0
1935 %head = insertelement <vscale x 4 x double> poison, double %s, i32 0
1936 %splat = shufflevector <vscale x 4 x double> %head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1937 %n = fneg <vscale x 4 x double> %splat
1938 %r = call <vscale x 4 x double> @llvm.copysign.nxv4f64(<vscale x 4 x double> %vm, <vscale x 4 x double> %n)
1939 ret <vscale x 4 x double> %r
1942 declare <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>)
1944 define <vscale x 8 x double> @vfcopysign_vv_nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %vs) {
1945 ; CHECK-LABEL: vfcopysign_vv_nxv8f64:
1947 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1948 ; CHECK-NEXT: vfsgnj.vv v8, v8, v16
1950 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %vs)
1951 ret <vscale x 8 x double> %r
1954 define <vscale x 8 x double> @vfcopysign_vf_nxv8f64(<vscale x 8 x double> %vm, double %s) {
1955 ; CHECK-LABEL: vfcopysign_vf_nxv8f64:
1957 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1958 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa0
1960 %head = insertelement <vscale x 8 x double> poison, double %s, i32 0
1961 %splat = shufflevector <vscale x 8 x double> %head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1962 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %splat)
1963 ret <vscale x 8 x double> %r
1966 define <vscale x 8 x double> @vfcopynsign_vv_nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %vs) {
1967 ; CHECK-LABEL: vfcopynsign_vv_nxv8f64:
1969 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1970 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v16
1972 %n = fneg <vscale x 8 x double> %vs
1973 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %n)
1974 ret <vscale x 8 x double> %r
1977 define <vscale x 8 x double> @vfcopynsign_vf_nxv8f64(<vscale x 8 x double> %vm, double %s) {
1978 ; CHECK-LABEL: vfcopynsign_vf_nxv8f64:
1980 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1981 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa0
1983 %head = insertelement <vscale x 8 x double> poison, double %s, i32 0
1984 %splat = shufflevector <vscale x 8 x double> %head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1985 %n = fneg <vscale x 8 x double> %splat
1986 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %n)
1987 ret <vscale x 8 x double> %r
1990 define <vscale x 8 x double> @vfcopysign_exttrunc_vv_nxv8f64_nxv8f16(<vscale x 8 x double> %vm, <vscale x 8 x half> %vs) {
1991 ; CHECK-LABEL: vfcopysign_exttrunc_vv_nxv8f64_nxv8f16:
1993 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1994 ; CHECK-NEXT: vfwcvt.f.f.v v20, v16
1995 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
1996 ; CHECK-NEXT: vfwcvt.f.f.v v24, v20
1997 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, ma
1998 ; CHECK-NEXT: vfsgnj.vv v8, v8, v24
2000 %e = fpext <vscale x 8 x half> %vs to <vscale x 8 x double>
2001 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %e)
2002 ret <vscale x 8 x double> %r
2005 define <vscale x 8 x double> @vfcopysign_exttrunc_vf_nxv8f64_nxv8f16(<vscale x 8 x double> %vm, half %s) {
2006 ; CHECK-LABEL: vfcopysign_exttrunc_vf_nxv8f64_nxv8f16:
2008 ; CHECK-NEXT: fcvt.d.h fa5, fa0
2009 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2010 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa5
2012 %head = insertelement <vscale x 8 x half> poison, half %s, i32 0
2013 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
2014 %esplat = fpext <vscale x 8 x half> %splat to <vscale x 8 x double>
2015 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %esplat)
2016 ret <vscale x 8 x double> %r
2019 define <vscale x 8 x double> @vfcopynsign_exttrunc_vv_nxv8f64_nxv8f16(<vscale x 8 x double> %vm, <vscale x 8 x half> %vs) {
2020 ; CHECK-LABEL: vfcopynsign_exttrunc_vv_nxv8f64_nxv8f16:
2022 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
2023 ; CHECK-NEXT: vfwcvt.f.f.v v20, v16
2024 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
2025 ; CHECK-NEXT: vfwcvt.f.f.v v24, v20
2026 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, ma
2027 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v24
2029 %n = fneg <vscale x 8 x half> %vs
2030 %eneg = fpext <vscale x 8 x half> %n to <vscale x 8 x double>
2031 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %eneg)
2032 ret <vscale x 8 x double> %r
2035 define <vscale x 8 x double> @vfcopynsign_exttrunc_vf_nxv8f64_nxv8f16(<vscale x 8 x double> %vm, half %s) {
2036 ; CHECK-LABEL: vfcopynsign_exttrunc_vf_nxv8f64_nxv8f16:
2038 ; CHECK-NEXT: fcvt.d.h fa5, fa0
2039 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2040 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa5
2042 %head = insertelement <vscale x 8 x half> poison, half %s, i32 0
2043 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
2044 %n = fneg <vscale x 8 x half> %splat
2045 %eneg = fpext <vscale x 8 x half> %n to <vscale x 8 x double>
2046 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %eneg)
2047 ret <vscale x 8 x double> %r
2050 define <vscale x 8 x double> @vfcopysign_exttrunc_vv_nxv8f64_nxv8f32(<vscale x 8 x double> %vm, <vscale x 8 x float> %vs) {
2051 ; CHECK-LABEL: vfcopysign_exttrunc_vv_nxv8f64_nxv8f32:
2053 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2054 ; CHECK-NEXT: vfwcvt.f.f.v v24, v16
2055 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, ma
2056 ; CHECK-NEXT: vfsgnj.vv v8, v8, v24
2058 %e = fpext <vscale x 8 x float> %vs to <vscale x 8 x double>
2059 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %e)
2060 ret <vscale x 8 x double> %r
2063 define <vscale x 8 x double> @vfcopysign_exttrunc_vf_nxv8f64_nxv8f32(<vscale x 8 x double> %vm, float %s) {
2064 ; CHECK-LABEL: vfcopysign_exttrunc_vf_nxv8f64_nxv8f32:
2066 ; CHECK-NEXT: fcvt.d.s fa5, fa0
2067 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2068 ; CHECK-NEXT: vfsgnj.vf v8, v8, fa5
2070 %head = insertelement <vscale x 8 x float> poison, float %s, i32 0
2071 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
2072 %esplat = fpext <vscale x 8 x float> %splat to <vscale x 8 x double>
2073 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %esplat)
2074 ret <vscale x 8 x double> %r
2077 define <vscale x 8 x double> @vfcopynsign_exttrunc_vv_nxv8f64_nxv8f32(<vscale x 8 x double> %vm, <vscale x 8 x float> %vs) {
2078 ; CHECK-LABEL: vfcopynsign_exttrunc_vv_nxv8f64_nxv8f32:
2080 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2081 ; CHECK-NEXT: vfwcvt.f.f.v v24, v16
2082 ; CHECK-NEXT: vsetvli zero, zero, e64, m8, ta, ma
2083 ; CHECK-NEXT: vfsgnjn.vv v8, v8, v24
2085 %n = fneg <vscale x 8 x float> %vs
2086 %eneg = fpext <vscale x 8 x float> %n to <vscale x 8 x double>
2087 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %eneg)
2088 ret <vscale x 8 x double> %r
2091 define <vscale x 8 x double> @vfcopynsign_exttrunc_vf_nxv8f64_nxv8f32(<vscale x 8 x double> %vm, float %s) {
2092 ; CHECK-LABEL: vfcopynsign_exttrunc_vf_nxv8f64_nxv8f32:
2094 ; CHECK-NEXT: fcvt.d.s fa5, fa0
2095 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2096 ; CHECK-NEXT: vfsgnjn.vf v8, v8, fa5
2098 %head = insertelement <vscale x 8 x float> poison, float %s, i32 0
2099 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
2100 %n = fneg <vscale x 8 x float> %splat
2101 %eneg = fpext <vscale x 8 x float> %n to <vscale x 8 x double>
2102 %r = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> %vm, <vscale x 8 x double> %eneg)
2103 ret <vscale x 8 x double> %r
2106 define <vscale x 2 x float> @fptrunc_of_copysign_nxv2f32_nxv2f64(<vscale x 2 x double> %X, <vscale x 2 x double> %Y) {
2107 ; CHECK-LABEL: fptrunc_of_copysign_nxv2f32_nxv2f64:
2109 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
2110 ; CHECK-NEXT: vfsgnj.vv v10, v8, v10
2111 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
2112 ; CHECK-NEXT: vfncvt.f.f.w v8, v10
2114 %copy = call fast <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double> %X, <vscale x 2 x double> %Y)
2115 %trunc = fptrunc <vscale x 2 x double> %copy to <vscale x 2 x float>
2116 ret <vscale x 2 x float> %trunc