xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/config/arm/mve.md (revision 4c3eb207d36f67d31994830c0a694161fc1ca39b)
1;; Arm M-profile Vector Extension Machine Description
2;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
3;;
4;; This file is part of GCC.
5;;
6;; GCC is free software; you can redistribute it and/or modify it
7;; under the terms of the GNU General Public License as published by
8;; the Free Software Foundation; either version 3, or (at your option)
9;; any later version.
10;;
11;; GCC is distributed in the hope that it will be useful, but
12;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14;; General Public License for more details.
15;;
16;; You should have received a copy of the GNU General Public License
17;; along with GCC; see the file COPYING3.  If not see
18;; <http://www.gnu.org/licenses/>.
19
20(define_insn "*mve_mov<mode>"
21  [(set (match_operand:MVE_types 0 "nonimmediate_operand" "=w,w,r,w,w,r,w,Ux,w")
22	(match_operand:MVE_types 1 "general_operand" "w,r,w,Dn,UxUi,r,Dm,w,Ul"))]
23  "TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT"
24{
25  if (which_alternative == 3 || which_alternative == 6)
26    {
27      int width, is_valid;
28      static char templ[40];
29
30      is_valid = simd_immediate_valid_for_move (operands[1], <MODE>mode,
31	&operands[1], &width);
32
33      gcc_assert (is_valid != 0);
34
35      if (width == 0)
36	return "vmov.f32\t%q0, %1  @ <mode>";
37      else
38	sprintf (templ, "vmov.i%d\t%%q0, %%x1  @ <mode>", width);
39      return templ;
40    }
41
42  if (which_alternative == 4 || which_alternative == 7)
43    {
44      if (<MODE>mode == V2DFmode || <MODE>mode == V2DImode || <MODE>mode == TImode)
45	{
46	  if (which_alternative == 7)
47	    output_asm_insn ("vstrw.32\t%q1, %E0", operands);
48	  else
49	    output_asm_insn ("vldrw.u32\t%q0, %E1",operands);
50	}
51      else
52	{
53	  if (which_alternative == 7)
54	    output_asm_insn ("vstr<V_sz_elem1>.<V_sz_elem>\t%q1, %E0", operands);
55	  else
56	    output_asm_insn ("vldr<V_sz_elem1>.<V_sz_elem>\t%q0, %E1", operands);
57	}
58      return "";
59    }
60  switch (which_alternative)
61    {
62    case 0:
63      return "vmov\t%q0, %q1";
64    case 1:
65      return "vmov\t%e0, %Q1, %R1  @ <mode>\;vmov\t%f0, %J1, %K1";
66    case 2:
67      return "vmov\t%Q0, %R0, %e1  @ <mode>\;vmov\t%J0, %K0, %f1";
68    case 5:
69      return output_move_quad (operands);
70    case 8:
71	return output_move_neon (operands);
72    default:
73      gcc_unreachable ();
74      return "";
75    }
76}
77  [(set_attr "type" "mve_move,mve_move,mve_move,mve_move,mve_load,multiple,mve_move,mve_store,mve_load")
78   (set_attr "length" "4,8,8,4,8,8,4,4,4")
79   (set_attr "thumb2_pool_range" "*,*,*,*,1018,*,*,*,*")
80   (set_attr "neg_pool_range" "*,*,*,*,996,*,*,*,*")])
81
82(define_insn "*mve_vdup<mode>"
83  [(set (match_operand:MVE_vecs 0 "s_register_operand" "=w")
84	(vec_duplicate:MVE_vecs
85	  (match_operand:<V_elem> 1 "s_register_operand" "r")))]
86  "TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT"
87  "vdup.<V_sz_elem>\t%q0, %1"
88  [(set_attr "length" "4")
89   (set_attr "type" "mve_move")])
90
91;;
92;; [vst4q])
93;;
94(define_insn "mve_vst4q<mode>"
95  [(set (match_operand:XI 0 "neon_struct_operand" "=Um")
96	(unspec:XI [(match_operand:XI 1 "s_register_operand" "w")
97		    (unspec:MVE_VLD_ST [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
98	 VST4Q))
99  ]
100  "TARGET_HAVE_MVE"
101{
102   rtx ops[6];
103   int regno = REGNO (operands[1]);
104   ops[0] = gen_rtx_REG (TImode, regno);
105   ops[1] = gen_rtx_REG (TImode, regno+4);
106   ops[2] = gen_rtx_REG (TImode, regno+8);
107   ops[3] = gen_rtx_REG (TImode, regno+12);
108   rtx reg  = operands[0];
109   while (reg && !REG_P (reg))
110    reg = XEXP (reg, 0);
111   gcc_assert (REG_P (reg));
112   ops[4] = reg;
113   ops[5] = operands[0];
114   /* Here in first three instructions data is stored to ops[4]'s location but
115      in the fourth instruction data is stored to operands[0], this is to
116      support the writeback.  */
117   output_asm_insn ("vst40.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
118		    "vst41.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
119		    "vst42.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
120		    "vst43.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, %5", ops);
121   return "";
122}
123  [(set_attr "length" "16")])
124
125;;
126;; [vrndq_m_f])
127;;
128(define_insn "mve_vrndq_m_f<mode>"
129  [
130   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
131	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
132		       (match_operand:MVE_0 2 "s_register_operand" "w")
133		       (match_operand:HI 3 "vpr_register_operand" "Up")]
134	 VRNDQ_M_F))
135  ]
136  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
137  "vpst\;vrintzt.f%#<V_sz_elem> %q0, %q2"
138  [(set_attr "type" "mve_move")
139   (set_attr "length""8")])
140
141;;
142;; [vrndxq_f])
143;;
144(define_insn "mve_vrndxq_f<mode>"
145  [
146   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
147	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
148	 VRNDXQ_F))
149  ]
150  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
151  "vrintx.f%#<V_sz_elem>	%q0, %q1"
152  [(set_attr "type" "mve_move")
153])
154
155;;
156;; [vrndq_f])
157;;
158(define_insn "mve_vrndq_f<mode>"
159  [
160   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
161	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
162	 VRNDQ_F))
163  ]
164  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
165  "vrintz.f%#<V_sz_elem>	%q0, %q1"
166  [(set_attr "type" "mve_move")
167])
168
169;;
170;; [vrndpq_f])
171;;
172(define_insn "mve_vrndpq_f<mode>"
173  [
174   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
175	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
176	 VRNDPQ_F))
177  ]
178  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
179  "vrintp.f%#<V_sz_elem>	%q0, %q1"
180  [(set_attr "type" "mve_move")
181])
182
183;;
184;; [vrndnq_f])
185;;
186(define_insn "mve_vrndnq_f<mode>"
187  [
188   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
189	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
190	 VRNDNQ_F))
191  ]
192  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
193  "vrintn.f%#<V_sz_elem>	%q0, %q1"
194  [(set_attr "type" "mve_move")
195])
196
197;;
198;; [vrndmq_f])
199;;
200(define_insn "mve_vrndmq_f<mode>"
201  [
202   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
203	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
204	 VRNDMQ_F))
205  ]
206  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
207  "vrintm.f%#<V_sz_elem>	%q0, %q1"
208  [(set_attr "type" "mve_move")
209])
210
211;;
212;; [vrndaq_f])
213;;
214(define_insn "mve_vrndaq_f<mode>"
215  [
216   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
217	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
218	 VRNDAQ_F))
219  ]
220  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
221  "vrinta.f%#<V_sz_elem>	%q0, %q1"
222  [(set_attr "type" "mve_move")
223])
224
225;;
226;; [vrev64q_f])
227;;
228(define_insn "mve_vrev64q_f<mode>"
229  [
230   (set (match_operand:MVE_0 0 "s_register_operand" "=&w")
231	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
232	 VREV64Q_F))
233  ]
234  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
235  "vrev64.%#<V_sz_elem> %q0, %q1"
236  [(set_attr "type" "mve_move")
237])
238
239;;
240;; [vnegq_f])
241;;
242(define_insn "mve_vnegq_f<mode>"
243  [
244   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
245	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
246	 VNEGQ_F))
247  ]
248  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
249  "vneg.f%#<V_sz_elem>  %q0, %q1"
250  [(set_attr "type" "mve_move")
251])
252
253;;
254;; [vdupq_n_f])
255;;
256(define_insn "mve_vdupq_n_f<mode>"
257  [
258   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
259	(unspec:MVE_0 [(match_operand:<V_elem> 1 "s_register_operand" "r")]
260	 VDUPQ_N_F))
261  ]
262  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
263  "vdup.%#<V_sz_elem>   %q0, %1"
264  [(set_attr "type" "mve_move")
265])
266
267;;
268;; [vabsq_f])
269;;
270(define_insn "mve_vabsq_f<mode>"
271  [
272   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
273	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
274	 VABSQ_F))
275  ]
276  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
277  "vabs.f%#<V_sz_elem>  %q0, %q1"
278  [(set_attr "type" "mve_move")
279])
280
281;;
282;; [vrev32q_f])
283;;
284(define_insn "mve_vrev32q_fv8hf"
285  [
286   (set (match_operand:V8HF 0 "s_register_operand" "=w")
287	(unspec:V8HF [(match_operand:V8HF 1 "s_register_operand" "w")]
288	 VREV32Q_F))
289  ]
290  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
291  "vrev32.16 %q0, %q1"
292  [(set_attr "type" "mve_move")
293])
294;;
295;; [vcvttq_f32_f16])
296;;
297(define_insn "mve_vcvttq_f32_f16v4sf"
298  [
299   (set (match_operand:V4SF 0 "s_register_operand" "=w")
300	(unspec:V4SF [(match_operand:V8HF 1 "s_register_operand" "w")]
301	 VCVTTQ_F32_F16))
302  ]
303  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
304  "vcvtt.f32.f16 %q0, %q1"
305  [(set_attr "type" "mve_move")
306])
307
308;;
309;; [vcvtbq_f32_f16])
310;;
311(define_insn "mve_vcvtbq_f32_f16v4sf"
312  [
313   (set (match_operand:V4SF 0 "s_register_operand" "=w")
314	(unspec:V4SF [(match_operand:V8HF 1 "s_register_operand" "w")]
315	 VCVTBQ_F32_F16))
316  ]
317  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
318  "vcvtb.f32.f16 %q0, %q1"
319  [(set_attr "type" "mve_move")
320])
321
322;;
323;; [vcvtq_to_f_s, vcvtq_to_f_u])
324;;
325(define_insn "mve_vcvtq_to_f_<supf><mode>"
326  [
327   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
328	(unspec:MVE_0 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
329	 VCVTQ_TO_F))
330  ]
331  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
332  "vcvt.f%#<V_sz_elem>.<supf>%#<V_sz_elem>       %q0, %q1"
333  [(set_attr "type" "mve_move")
334])
335
336;;
337;; [vrev64q_u, vrev64q_s])
338;;
339(define_insn "mve_vrev64q_<supf><mode>"
340  [
341   (set (match_operand:MVE_2 0 "s_register_operand" "=&w")
342	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")]
343	 VREV64Q))
344  ]
345  "TARGET_HAVE_MVE"
346  "vrev64.%#<V_sz_elem> %q0, %q1"
347  [(set_attr "type" "mve_move")
348])
349
350;;
351;; [vcvtq_from_f_s, vcvtq_from_f_u])
352;;
353(define_insn "mve_vcvtq_from_f_<supf><mode>"
354  [
355   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
356	(unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
357	 VCVTQ_FROM_F))
358  ]
359  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
360  "vcvt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>       %q0, %q1"
361  [(set_attr "type" "mve_move")
362])
363;; [vqnegq_s])
364;;
365(define_insn "mve_vqnegq_s<mode>"
366  [
367   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
368	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")]
369	 VQNEGQ_S))
370  ]
371  "TARGET_HAVE_MVE"
372  "vqneg.s%#<V_sz_elem> %q0, %q1"
373  [(set_attr "type" "mve_move")
374])
375
376;;
377;; [vqabsq_s])
378;;
379(define_insn "mve_vqabsq_s<mode>"
380  [
381   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
382	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")]
383	 VQABSQ_S))
384  ]
385  "TARGET_HAVE_MVE"
386  "vqabs.s%#<V_sz_elem> %q0, %q1"
387  [(set_attr "type" "mve_move")
388])
389
390;;
391;; [vnegq_s])
392;;
393(define_insn "mve_vnegq_s<mode>"
394  [
395   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
396	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")]
397	 VNEGQ_S))
398  ]
399  "TARGET_HAVE_MVE"
400  "vneg.s%#<V_sz_elem>  %q0, %q1"
401  [(set_attr "type" "mve_move")
402])
403
404;;
405;; [vmvnq_u, vmvnq_s])
406;;
407(define_insn "mve_vmvnq_<supf><mode>"
408  [
409   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
410	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")]
411	 VMVNQ))
412  ]
413  "TARGET_HAVE_MVE"
414  "vmvn %q0, %q1"
415  [(set_attr "type" "mve_move")
416])
417
418;;
419;; [vdupq_n_u, vdupq_n_s])
420;;
421(define_insn "mve_vdupq_n_<supf><mode>"
422  [
423   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
424	(unspec:MVE_2 [(match_operand:<V_elem> 1 "s_register_operand" "r")]
425	 VDUPQ_N))
426  ]
427  "TARGET_HAVE_MVE"
428  "vdup.%#<V_sz_elem>   %q0, %1"
429  [(set_attr "type" "mve_move")
430])
431
432;;
433;; [vclzq_u, vclzq_s])
434;;
435(define_insn "mve_vclzq_<supf><mode>"
436  [
437   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
438	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")]
439	 VCLZQ))
440  ]
441  "TARGET_HAVE_MVE"
442  "vclz.i%#<V_sz_elem>  %q0, %q1"
443  [(set_attr "type" "mve_move")
444])
445
446;;
447;; [vclsq_s])
448;;
449(define_insn "mve_vclsq_s<mode>"
450  [
451   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
452	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")]
453	 VCLSQ_S))
454  ]
455  "TARGET_HAVE_MVE"
456  "vcls.s%#<V_sz_elem>  %q0, %q1"
457  [(set_attr "type" "mve_move")
458])
459
460;;
461;; [vaddvq_s, vaddvq_u])
462;;
463(define_insn "mve_vaddvq_<supf><mode>"
464  [
465   (set (match_operand:SI 0 "s_register_operand" "=Te")
466	(unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")]
467	 VADDVQ))
468  ]
469  "TARGET_HAVE_MVE"
470  "vaddv.<supf>%#<V_sz_elem>\t%0, %q1"
471  [(set_attr "type" "mve_move")
472])
473
474;;
475;; [vabsq_s])
476;;
477(define_insn "mve_vabsq_s<mode>"
478  [
479   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
480	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")]
481	 VABSQ_S))
482  ]
483  "TARGET_HAVE_MVE"
484  "vabs.s%#<V_sz_elem>\t%q0, %q1"
485  [(set_attr "type" "mve_move")
486])
487
488;;
489;; [vrev32q_u, vrev32q_s])
490;;
491(define_insn "mve_vrev32q_<supf><mode>"
492  [
493   (set (match_operand:MVE_3 0 "s_register_operand" "=w")
494	(unspec:MVE_3 [(match_operand:MVE_3 1 "s_register_operand" "w")]
495	 VREV32Q))
496  ]
497  "TARGET_HAVE_MVE"
498  "vrev32.%#<V_sz_elem>\t%q0, %q1"
499  [(set_attr "type" "mve_move")
500])
501
502;;
503;; [vmovltq_u, vmovltq_s])
504;;
505(define_insn "mve_vmovltq_<supf><mode>"
506  [
507   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
508	(unspec:<V_double_width> [(match_operand:MVE_3 1 "s_register_operand" "w")]
509	 VMOVLTQ))
510  ]
511  "TARGET_HAVE_MVE"
512  "vmovlt.<supf>%#<V_sz_elem>   %q0, %q1"
513  [(set_attr "type" "mve_move")
514])
515
516;;
517;; [vmovlbq_s, vmovlbq_u])
518;;
519(define_insn "mve_vmovlbq_<supf><mode>"
520  [
521   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
522	(unspec:<V_double_width> [(match_operand:MVE_3 1 "s_register_operand" "w")]
523	 VMOVLBQ))
524  ]
525  "TARGET_HAVE_MVE"
526  "vmovlb.<supf>%#<V_sz_elem>   %q0, %q1"
527  [(set_attr "type" "mve_move")
528])
529
530;;
531;; [vcvtpq_s, vcvtpq_u])
532;;
533(define_insn "mve_vcvtpq_<supf><mode>"
534  [
535   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
536	(unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
537	 VCVTPQ))
538  ]
539  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
540  "vcvtp.<supf>%#<V_sz_elem>.f%#<V_sz_elem>      %q0, %q1"
541  [(set_attr "type" "mve_move")
542])
543
544;;
545;; [vcvtnq_s, vcvtnq_u])
546;;
547(define_insn "mve_vcvtnq_<supf><mode>"
548  [
549   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
550	(unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
551	 VCVTNQ))
552  ]
553  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
554  "vcvtn.<supf>%#<V_sz_elem>.f%#<V_sz_elem>      %q0, %q1"
555  [(set_attr "type" "mve_move")
556])
557
558;;
559;; [vcvtmq_s, vcvtmq_u])
560;;
561(define_insn "mve_vcvtmq_<supf><mode>"
562  [
563   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
564	(unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
565	 VCVTMQ))
566  ]
567  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
568  "vcvtm.<supf>%#<V_sz_elem>.f%#<V_sz_elem>      %q0, %q1"
569  [(set_attr "type" "mve_move")
570])
571
572;;
573;; [vcvtaq_u, vcvtaq_s])
574;;
575(define_insn "mve_vcvtaq_<supf><mode>"
576  [
577   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
578	(unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
579	 VCVTAQ))
580  ]
581  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
582  "vcvta.<supf>%#<V_sz_elem>.f%#<V_sz_elem>      %q0, %q1"
583  [(set_attr "type" "mve_move")
584])
585
586;;
587;; [vmvnq_n_u, vmvnq_n_s])
588;;
589(define_insn "mve_vmvnq_n_<supf><mode>"
590  [
591   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
592	(unspec:MVE_5 [(match_operand:HI 1 "immediate_operand" "i")]
593	 VMVNQ_N))
594  ]
595  "TARGET_HAVE_MVE"
596  "vmvn.i%#<V_sz_elem>  %q0, %1"
597  [(set_attr "type" "mve_move")
598])
599
600;;
601;; [vrev16q_u, vrev16q_s])
602;;
603(define_insn "mve_vrev16q_<supf>v16qi"
604  [
605   (set (match_operand:V16QI 0 "s_register_operand" "=w")
606	(unspec:V16QI [(match_operand:V16QI 1 "s_register_operand" "w")]
607	 VREV16Q))
608  ]
609  "TARGET_HAVE_MVE"
610  "vrev16.8 %q0, %q1"
611  [(set_attr "type" "mve_move")
612])
613
614;;
615;; [vaddlvq_s vaddlvq_u])
616;;
617(define_insn "mve_vaddlvq_<supf>v4si"
618  [
619   (set (match_operand:DI 0 "s_register_operand" "=r")
620	(unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")]
621	 VADDLVQ))
622  ]
623  "TARGET_HAVE_MVE"
624  "vaddlv.<supf>32 %Q0, %R0, %q1"
625  [(set_attr "type" "mve_move")
626])
627
628;;
629;; [vctp8q vctp16q vctp32q vctp64q])
630;;
631(define_insn "mve_vctp<mode1>qhi"
632  [
633   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
634	(unspec:HI [(match_operand:SI 1 "s_register_operand" "r")]
635	VCTPQ))
636  ]
637  "TARGET_HAVE_MVE"
638  "vctp.<mode1> %1"
639  [(set_attr "type" "mve_move")
640])
641
642;;
643;; [vpnot])
644;;
645(define_insn "mve_vpnothi"
646  [
647   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
648	(unspec:HI [(match_operand:HI 1 "vpr_register_operand" "0")]
649	 VPNOT))
650  ]
651  "TARGET_HAVE_MVE"
652  "vpnot"
653  [(set_attr "type" "mve_move")
654])
655
656;;
657;; [vsubq_n_f])
658;;
659(define_insn "mve_vsubq_n_f<mode>"
660  [
661   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
662	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
663		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
664	 VSUBQ_N_F))
665  ]
666  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
667  "vsub.f<V_sz_elem>  %q0, %q1, %2"
668  [(set_attr "type" "mve_move")
669])
670
671;;
672;; [vbrsrq_n_f])
673;;
674(define_insn "mve_vbrsrq_n_f<mode>"
675  [
676   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
677	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
678		       (match_operand:SI 2 "s_register_operand" "r")]
679	 VBRSRQ_N_F))
680  ]
681  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
682  "vbrsr.<V_sz_elem>  %q0, %q1, %2"
683  [(set_attr "type" "mve_move")
684])
685
686;;
687;; [vcvtq_n_to_f_s, vcvtq_n_to_f_u])
688;;
689(define_insn "mve_vcvtq_n_to_f_<supf><mode>"
690  [
691   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
692	(unspec:MVE_0 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")
693		       (match_operand:SI 2 "<MVE_pred2>" "<MVE_constraint2>")]
694	 VCVTQ_N_TO_F))
695  ]
696  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
697  "vcvt.f<V_sz_elem>.<supf><V_sz_elem>\t%q0, %q1, %2"
698  [(set_attr "type" "mve_move")
699])
700
701;; [vcreateq_f])
702;;
703(define_insn "mve_vcreateq_f<mode>"
704  [
705   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
706	(unspec:MVE_0 [(match_operand:DI 1 "s_register_operand" "r")
707		       (match_operand:DI 2 "s_register_operand" "r")]
708	 VCREATEQ_F))
709  ]
710  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
711  "vmov %q0[2], %q0[0], %Q2, %Q1\;vmov %q0[3], %q0[1], %R2, %R1"
712  [(set_attr "type" "mve_move")
713   (set_attr "length""8")])
714
715;;
716;; [vcreateq_u, vcreateq_s])
717;;
718(define_insn "mve_vcreateq_<supf><mode>"
719  [
720   (set (match_operand:MVE_1 0 "s_register_operand" "=w")
721	(unspec:MVE_1 [(match_operand:DI 1 "s_register_operand" "r")
722		       (match_operand:DI 2 "s_register_operand" "r")]
723	 VCREATEQ))
724  ]
725  "TARGET_HAVE_MVE"
726  "vmov %q0[2], %q0[0], %Q2, %Q1\;vmov %q0[3], %q0[1], %R2, %R1"
727  [(set_attr "type" "mve_move")
728   (set_attr "length""8")])
729
730;;
731;; [vshrq_n_s, vshrq_n_u])
732;;
733(define_insn "mve_vshrq_n_<supf><mode>"
734  [
735   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
736	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
737		       (match_operand:SI 2 "<MVE_pred2>" "<MVE_constraint2>")]
738	 VSHRQ_N))
739  ]
740  "TARGET_HAVE_MVE"
741  "vshr.<supf><V_sz_elem>\t%q0, %q1, %2"
742  [(set_attr "type" "mve_move")
743])
744
745;;
746;; [vcvtq_n_from_f_s, vcvtq_n_from_f_u])
747;;
748(define_insn "mve_vcvtq_n_from_f_<supf><mode>"
749  [
750   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
751	(unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")
752		       (match_operand:SI 2 "<MVE_pred2>" "<MVE_constraint2>")]
753	 VCVTQ_N_FROM_F))
754  ]
755  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
756  "vcvt.<supf><V_sz_elem>.f<V_sz_elem>\t%q0, %q1, %2"
757  [(set_attr "type" "mve_move")
758])
759
760;;
761;; [vaddlvq_p_s])
762;;
763(define_insn "mve_vaddlvq_p_<supf>v4si"
764  [
765   (set (match_operand:DI 0 "s_register_operand" "=r")
766	(unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
767		    (match_operand:HI 2 "vpr_register_operand" "Up")]
768	 VADDLVQ_P))
769  ]
770  "TARGET_HAVE_MVE"
771  "vpst\;vaddlvt.<supf>32 %Q0, %R0, %q1"
772  [(set_attr "type" "mve_move")
773   (set_attr "length""8")])
774
775;;
776;; [vcmpneq_u, vcmpneq_s])
777;;
778(define_insn "mve_vcmpneq_<supf><mode>"
779  [
780   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
781	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
782		    (match_operand:MVE_2 2 "s_register_operand" "w")]
783	 VCMPNEQ))
784  ]
785  "TARGET_HAVE_MVE"
786  "vcmp.i%#<V_sz_elem>  ne, %q1, %q2"
787  [(set_attr "type" "mve_move")
788])
789
790;;
791;; [vshlq_s, vshlq_u])
792;;
793(define_insn "mve_vshlq_<supf><mode>"
794  [
795   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
796	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
797		       (match_operand:MVE_2 2 "s_register_operand" "w")]
798	 VSHLQ))
799  ]
800  "TARGET_HAVE_MVE"
801  "vshl.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
802  [(set_attr "type" "mve_move")
803])
804
805;;
806;; [vabdq_s, vabdq_u])
807;;
808(define_insn "mve_vabdq_<supf><mode>"
809  [
810   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
811	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
812		       (match_operand:MVE_2 2 "s_register_operand" "w")]
813	 VABDQ))
814  ]
815  "TARGET_HAVE_MVE"
816  "vabd.<supf>%#<V_sz_elem>	%q0, %q1, %q2"
817  [(set_attr "type" "mve_move")
818])
819
820;;
821;; [vaddq_n_s, vaddq_n_u])
822;;
823(define_insn "mve_vaddq_n_<supf><mode>"
824  [
825   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
826	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
827		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
828	 VADDQ_N))
829  ]
830  "TARGET_HAVE_MVE"
831  "vadd.i%#<V_sz_elem>	%q0, %q1, %2"
832  [(set_attr "type" "mve_move")
833])
834
835;;
836;; [vaddvaq_s, vaddvaq_u])
837;;
838(define_insn "mve_vaddvaq_<supf><mode>"
839  [
840   (set (match_operand:SI 0 "s_register_operand" "=Te")
841	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
842		    (match_operand:MVE_2 2 "s_register_operand" "w")]
843	 VADDVAQ))
844  ]
845  "TARGET_HAVE_MVE"
846  "vaddva.<supf>%#<V_sz_elem>	%0, %q2"
847  [(set_attr "type" "mve_move")
848])
849
850;;
851;; [vaddvq_p_u, vaddvq_p_s])
852;;
853(define_insn "mve_vaddvq_p_<supf><mode>"
854  [
855   (set (match_operand:SI 0 "s_register_operand" "=Te")
856	(unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
857		    (match_operand:HI 2 "vpr_register_operand" "Up")]
858	 VADDVQ_P))
859  ]
860  "TARGET_HAVE_MVE"
861  "vpst\;vaddvt.<supf>%#<V_sz_elem>	%0, %q1"
862  [(set_attr "type" "mve_move")
863   (set_attr "length""8")])
864
865;;
866;; [vandq_u, vandq_s])
867;;
868(define_insn "mve_vandq_<supf><mode>"
869  [
870   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
871	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
872		       (match_operand:MVE_2 2 "s_register_operand" "w")]
873	 VANDQ))
874  ]
875  "TARGET_HAVE_MVE"
876  "vand %q0, %q1, %q2"
877  [(set_attr "type" "mve_move")
878])
879
880;;
881;; [vbicq_s, vbicq_u])
882;;
883(define_insn "mve_vbicq_<supf><mode>"
884  [
885   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
886	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
887		       (match_operand:MVE_2 2 "s_register_operand" "w")]
888	 VBICQ))
889  ]
890  "TARGET_HAVE_MVE"
891  "vbic %q0, %q1, %q2"
892  [(set_attr "type" "mve_move")
893])
894
895;;
896;; [vbrsrq_n_u, vbrsrq_n_s])
897;;
898(define_insn "mve_vbrsrq_n_<supf><mode>"
899  [
900   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
901	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
902		       (match_operand:SI 2 "s_register_operand" "r")]
903	 VBRSRQ_N))
904  ]
905  "TARGET_HAVE_MVE"
906  "vbrsr.%#<V_sz_elem>	%q0, %q1, %2"
907  [(set_attr "type" "mve_move")
908])
909
910;;
911;; [vcaddq_rot270_s, vcaddq_rot270_u])
912;;
913(define_insn "mve_vcaddq_rot270_<supf><mode>"
914  [
915   (set (match_operand:MVE_2 0 "s_register_operand" "<earlyclobber_32>")
916	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
917		       (match_operand:MVE_2 2 "s_register_operand" "w")]
918	 VCADDQ_ROT270))
919  ]
920  "TARGET_HAVE_MVE"
921  "vcadd.i%#<V_sz_elem>	%q0, %q1, %q2, #270"
922  [(set_attr "type" "mve_move")
923])
924
925;;
926;; [vcaddq_rot90_u, vcaddq_rot90_s])
927;;
928(define_insn "mve_vcaddq_rot90_<supf><mode>"
929  [
930   (set (match_operand:MVE_2 0 "s_register_operand" "<earlyclobber_32>")
931	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
932		       (match_operand:MVE_2 2 "s_register_operand" "w")]
933	 VCADDQ_ROT90))
934  ]
935  "TARGET_HAVE_MVE"
936  "vcadd.i%#<V_sz_elem>	%q0, %q1, %q2, #90"
937  [(set_attr "type" "mve_move")
938])
939
940;;
941;; [vcmpcsq_n_u])
942;;
943(define_insn "mve_vcmpcsq_n_u<mode>"
944  [
945   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
946	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
947		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
948	 VCMPCSQ_N_U))
949  ]
950  "TARGET_HAVE_MVE"
951  "vcmp.u%#<V_sz_elem>	cs, %q1, %2"
952  [(set_attr "type" "mve_move")
953])
954
955;;
956;; [vcmpcsq_u])
957;;
958(define_insn "mve_vcmpcsq_u<mode>"
959  [
960   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
961	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
962		    (match_operand:MVE_2 2 "s_register_operand" "w")]
963	 VCMPCSQ_U))
964  ]
965  "TARGET_HAVE_MVE"
966  "vcmp.u%#<V_sz_elem>	cs, %q1, %q2"
967  [(set_attr "type" "mve_move")
968])
969
970;;
971;; [vcmpeqq_n_s, vcmpeqq_n_u])
972;;
973(define_insn "mve_vcmpeqq_n_<supf><mode>"
974  [
975   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
976	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
977		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
978	 VCMPEQQ_N))
979  ]
980  "TARGET_HAVE_MVE"
981  "vcmp.i%#<V_sz_elem>	eq, %q1, %2"
982  [(set_attr "type" "mve_move")
983])
984
985;;
986;; [vcmpeqq_u, vcmpeqq_s])
987;;
988(define_insn "mve_vcmpeqq_<supf><mode>"
989  [
990   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
991	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
992		    (match_operand:MVE_2 2 "s_register_operand" "w")]
993	 VCMPEQQ))
994  ]
995  "TARGET_HAVE_MVE"
996  "vcmp.i%#<V_sz_elem>	eq, %q1, %q2"
997  [(set_attr "type" "mve_move")
998])
999
1000;;
1001;; [vcmpgeq_n_s])
1002;;
1003(define_insn "mve_vcmpgeq_n_s<mode>"
1004  [
1005   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1006	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1007		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
1008	 VCMPGEQ_N_S))
1009  ]
1010  "TARGET_HAVE_MVE"
1011  "vcmp.s%#<V_sz_elem>	ge, %q1, %2"
1012  [(set_attr "type" "mve_move")
1013])
1014
1015;;
1016;; [vcmpgeq_s])
1017;;
1018(define_insn "mve_vcmpgeq_s<mode>"
1019  [
1020   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1021	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1022		    (match_operand:MVE_2 2 "s_register_operand" "w")]
1023	 VCMPGEQ_S))
1024  ]
1025  "TARGET_HAVE_MVE"
1026  "vcmp.s%#<V_sz_elem>	ge, %q1, %q2"
1027  [(set_attr "type" "mve_move")
1028])
1029
1030;;
1031;; [vcmpgtq_n_s])
1032;;
1033(define_insn "mve_vcmpgtq_n_s<mode>"
1034  [
1035   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1036	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1037		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
1038	 VCMPGTQ_N_S))
1039  ]
1040  "TARGET_HAVE_MVE"
1041  "vcmp.s%#<V_sz_elem>	gt, %q1, %2"
1042  [(set_attr "type" "mve_move")
1043])
1044
1045;;
1046;; [vcmpgtq_s])
1047;;
1048(define_insn "mve_vcmpgtq_s<mode>"
1049  [
1050   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1051	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1052		    (match_operand:MVE_2 2 "s_register_operand" "w")]
1053	 VCMPGTQ_S))
1054  ]
1055  "TARGET_HAVE_MVE"
1056  "vcmp.s%#<V_sz_elem>	gt, %q1, %q2"
1057  [(set_attr "type" "mve_move")
1058])
1059
1060;;
1061;; [vcmphiq_n_u])
1062;;
1063(define_insn "mve_vcmphiq_n_u<mode>"
1064  [
1065   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1066	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1067		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
1068	 VCMPHIQ_N_U))
1069  ]
1070  "TARGET_HAVE_MVE"
1071  "vcmp.u%#<V_sz_elem>	hi, %q1, %2"
1072  [(set_attr "type" "mve_move")
1073])
1074
1075;;
1076;; [vcmphiq_u])
1077;;
1078(define_insn "mve_vcmphiq_u<mode>"
1079  [
1080   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1081	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1082		    (match_operand:MVE_2 2 "s_register_operand" "w")]
1083	 VCMPHIQ_U))
1084  ]
1085  "TARGET_HAVE_MVE"
1086  "vcmp.u%#<V_sz_elem>	hi, %q1, %q2"
1087  [(set_attr "type" "mve_move")
1088])
1089
1090;;
1091;; [vcmpleq_n_s])
1092;;
1093(define_insn "mve_vcmpleq_n_s<mode>"
1094  [
1095   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1096	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1097		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
1098	 VCMPLEQ_N_S))
1099  ]
1100  "TARGET_HAVE_MVE"
1101  "vcmp.s%#<V_sz_elem>	le, %q1, %2"
1102  [(set_attr "type" "mve_move")
1103])
1104
1105;;
1106;; [vcmpleq_s])
1107;;
1108(define_insn "mve_vcmpleq_s<mode>"
1109  [
1110   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1111	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1112		    (match_operand:MVE_2 2 "s_register_operand" "w")]
1113	 VCMPLEQ_S))
1114  ]
1115  "TARGET_HAVE_MVE"
1116  "vcmp.s%#<V_sz_elem>	le, %q1, %q2"
1117  [(set_attr "type" "mve_move")
1118])
1119
1120;;
1121;; [vcmpltq_n_s])
1122;;
1123(define_insn "mve_vcmpltq_n_s<mode>"
1124  [
1125   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1126	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1127		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
1128	 VCMPLTQ_N_S))
1129  ]
1130  "TARGET_HAVE_MVE"
1131  "vcmp.s%#<V_sz_elem>	lt, %q1, %2"
1132  [(set_attr "type" "mve_move")
1133])
1134
1135;;
1136;; [vcmpltq_s])
1137;;
1138(define_insn "mve_vcmpltq_s<mode>"
1139  [
1140   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1141	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1142		    (match_operand:MVE_2 2 "s_register_operand" "w")]
1143	 VCMPLTQ_S))
1144  ]
1145  "TARGET_HAVE_MVE"
1146  "vcmp.s%#<V_sz_elem>	lt, %q1, %q2"
1147  [(set_attr "type" "mve_move")
1148])
1149
1150;;
1151;; [vcmpneq_n_u, vcmpneq_n_s])
1152;;
1153(define_insn "mve_vcmpneq_n_<supf><mode>"
1154  [
1155   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
1156	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
1157		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
1158	 VCMPNEQ_N))
1159  ]
1160  "TARGET_HAVE_MVE"
1161  "vcmp.i%#<V_sz_elem>	ne, %q1, %2"
1162  [(set_attr "type" "mve_move")
1163])
1164
1165;;
1166;; [veorq_u, veorq_s])
1167;;
1168(define_insn "mve_veorq_<supf><mode>"
1169  [
1170   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1171	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1172		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1173	 VEORQ))
1174  ]
1175  "TARGET_HAVE_MVE"
1176  "veor %q0, %q1, %q2"
1177  [(set_attr "type" "mve_move")
1178])
1179
1180;;
1181;; [vhaddq_n_u, vhaddq_n_s])
1182;;
1183(define_insn "mve_vhaddq_n_<supf><mode>"
1184  [
1185   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1186	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1187		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
1188	 VHADDQ_N))
1189  ]
1190  "TARGET_HAVE_MVE"
1191  "vhadd.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
1192  [(set_attr "type" "mve_move")
1193])
1194
1195;;
1196;; [vhaddq_s, vhaddq_u])
1197;;
1198(define_insn "mve_vhaddq_<supf><mode>"
1199  [
1200   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1201	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1202		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1203	 VHADDQ))
1204  ]
1205  "TARGET_HAVE_MVE"
1206  "vhadd.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1207  [(set_attr "type" "mve_move")
1208])
1209
1210;;
1211;; [vhcaddq_rot270_s])
1212;;
1213(define_insn "mve_vhcaddq_rot270_s<mode>"
1214  [
1215   (set (match_operand:MVE_2 0 "s_register_operand" "<earlyclobber_32>")
1216	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1217		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1218	 VHCADDQ_ROT270_S))
1219  ]
1220  "TARGET_HAVE_MVE"
1221  "vhcadd.s%#<V_sz_elem>\t%q0, %q1, %q2, #270"
1222  [(set_attr "type" "mve_move")
1223])
1224
1225;;
1226;; [vhcaddq_rot90_s])
1227;;
1228(define_insn "mve_vhcaddq_rot90_s<mode>"
1229  [
1230   (set (match_operand:MVE_2 0 "s_register_operand" "<earlyclobber_32>")
1231	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1232		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1233	 VHCADDQ_ROT90_S))
1234  ]
1235  "TARGET_HAVE_MVE"
1236  "vhcadd.s%#<V_sz_elem>\t%q0, %q1, %q2, #90"
1237  [(set_attr "type" "mve_move")
1238])
1239
1240;;
1241;; [vhsubq_n_u, vhsubq_n_s])
1242;;
1243(define_insn "mve_vhsubq_n_<supf><mode>"
1244  [
1245   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1246	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1247		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
1248	 VHSUBQ_N))
1249  ]
1250  "TARGET_HAVE_MVE"
1251  "vhsub.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
1252  [(set_attr "type" "mve_move")
1253])
1254
1255;;
1256;; [vhsubq_s, vhsubq_u])
1257;;
1258(define_insn "mve_vhsubq_<supf><mode>"
1259  [
1260   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1261	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1262		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1263	 VHSUBQ))
1264  ]
1265  "TARGET_HAVE_MVE"
1266  "vhsub.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1267  [(set_attr "type" "mve_move")
1268])
1269
1270;;
1271;; [vmaxaq_s])
1272;;
1273(define_insn "mve_vmaxaq_s<mode>"
1274  [
1275   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1276	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1277		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1278	 VMAXAQ_S))
1279  ]
1280  "TARGET_HAVE_MVE"
1281  "vmaxa.s%#<V_sz_elem>	%q0, %q2"
1282  [(set_attr "type" "mve_move")
1283])
1284
1285;;
1286;; [vmaxavq_s])
1287;;
1288(define_insn "mve_vmaxavq_s<mode>"
1289  [
1290   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
1291	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
1292			  (match_operand:MVE_2 2 "s_register_operand" "w")]
1293	 VMAXAVQ_S))
1294  ]
1295  "TARGET_HAVE_MVE"
1296  "vmaxav.s%#<V_sz_elem>\t%0, %q2"
1297  [(set_attr "type" "mve_move")
1298])
1299
1300;;
1301;; [vmaxq_u, vmaxq_s])
1302;;
1303(define_insn "mve_vmaxq_<supf><mode>"
1304  [
1305   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1306	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1307		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1308	 VMAXQ))
1309  ]
1310  "TARGET_HAVE_MVE"
1311  "vmax.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1312  [(set_attr "type" "mve_move")
1313])
1314
1315;;
1316;; [vmaxvq_u, vmaxvq_s])
1317;;
1318(define_insn "mve_vmaxvq_<supf><mode>"
1319  [
1320   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
1321	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
1322			  (match_operand:MVE_2 2 "s_register_operand" "w")]
1323	 VMAXVQ))
1324  ]
1325  "TARGET_HAVE_MVE"
1326  "vmaxv.<supf>%#<V_sz_elem>\t%0, %q2"
1327  [(set_attr "type" "mve_move")
1328])
1329
1330;;
1331;; [vminaq_s])
1332;;
1333(define_insn "mve_vminaq_s<mode>"
1334  [
1335   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1336	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1337		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1338	 VMINAQ_S))
1339  ]
1340  "TARGET_HAVE_MVE"
1341  "vmina.s%#<V_sz_elem>\t%q0, %q2"
1342  [(set_attr "type" "mve_move")
1343])
1344
1345;;
1346;; [vminavq_s])
1347;;
1348(define_insn "mve_vminavq_s<mode>"
1349  [
1350   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
1351	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
1352			  (match_operand:MVE_2 2 "s_register_operand" "w")]
1353	 VMINAVQ_S))
1354  ]
1355  "TARGET_HAVE_MVE"
1356  "vminav.s%#<V_sz_elem>\t%0, %q2"
1357  [(set_attr "type" "mve_move")
1358])
1359
1360;;
1361;; [vminq_s, vminq_u])
1362;;
1363(define_insn "mve_vminq_<supf><mode>"
1364  [
1365   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1366	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1367		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1368	 VMINQ))
1369  ]
1370  "TARGET_HAVE_MVE"
1371  "vmin.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1372  [(set_attr "type" "mve_move")
1373])
1374
1375;;
1376;; [vminvq_u, vminvq_s])
1377;;
1378(define_insn "mve_vminvq_<supf><mode>"
1379  [
1380   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
1381	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
1382			  (match_operand:MVE_2 2 "s_register_operand" "w")]
1383	 VMINVQ))
1384  ]
1385  "TARGET_HAVE_MVE"
1386  "vminv.<supf>%#<V_sz_elem>\t%0, %q2"
1387  [(set_attr "type" "mve_move")
1388])
1389
1390;;
1391;; [vmladavq_u, vmladavq_s])
1392;;
1393(define_insn "mve_vmladavq_<supf><mode>"
1394  [
1395   (set (match_operand:SI 0 "s_register_operand" "=Te")
1396	(unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
1397		    (match_operand:MVE_2 2 "s_register_operand" "w")]
1398	 VMLADAVQ))
1399  ]
1400  "TARGET_HAVE_MVE"
1401  "vmladav.<supf>%#<V_sz_elem>\t%0, %q1, %q2"
1402  [(set_attr "type" "mve_move")
1403])
1404
1405;;
1406;; [vmladavxq_s])
1407;;
1408(define_insn "mve_vmladavxq_s<mode>"
1409  [
1410   (set (match_operand:SI 0 "s_register_operand" "=Te")
1411	(unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
1412		    (match_operand:MVE_2 2 "s_register_operand" "w")]
1413	 VMLADAVXQ_S))
1414  ]
1415  "TARGET_HAVE_MVE"
1416  "vmladavx.s%#<V_sz_elem>\t%0, %q1, %q2"
1417  [(set_attr "type" "mve_move")
1418])
1419
1420;;
1421;; [vmlsdavq_s])
1422;;
1423(define_insn "mve_vmlsdavq_s<mode>"
1424  [
1425   (set (match_operand:SI 0 "s_register_operand" "=Te")
1426	(unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
1427		    (match_operand:MVE_2 2 "s_register_operand" "w")]
1428	 VMLSDAVQ_S))
1429  ]
1430  "TARGET_HAVE_MVE"
1431  "vmlsdav.s%#<V_sz_elem>\t%0, %q1, %q2"
1432  [(set_attr "type" "mve_move")
1433])
1434
1435;;
1436;; [vmlsdavxq_s])
1437;;
1438(define_insn "mve_vmlsdavxq_s<mode>"
1439  [
1440   (set (match_operand:SI 0 "s_register_operand" "=Te")
1441	(unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
1442		    (match_operand:MVE_2 2 "s_register_operand" "w")]
1443	 VMLSDAVXQ_S))
1444  ]
1445  "TARGET_HAVE_MVE"
1446  "vmlsdavx.s%#<V_sz_elem>\t%0, %q1, %q2"
1447  [(set_attr "type" "mve_move")
1448])
1449
1450;;
1451;; [vmulhq_s, vmulhq_u])
1452;;
1453(define_insn "mve_vmulhq_<supf><mode>"
1454  [
1455   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1456	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1457		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1458	 VMULHQ))
1459  ]
1460  "TARGET_HAVE_MVE"
1461  "vmulh.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1462  [(set_attr "type" "mve_move")
1463])
1464
1465;;
1466;; [vmullbq_int_u, vmullbq_int_s])
1467;;
1468(define_insn "mve_vmullbq_int_<supf><mode>"
1469  [
1470   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
1471	(unspec:<V_double_width> [(match_operand:MVE_2 1 "s_register_operand" "w")
1472				  (match_operand:MVE_2 2 "s_register_operand" "w")]
1473	 VMULLBQ_INT))
1474  ]
1475  "TARGET_HAVE_MVE"
1476  "vmullb.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1477  [(set_attr "type" "mve_move")
1478])
1479
1480;;
1481;; [vmulltq_int_u, vmulltq_int_s])
1482;;
1483(define_insn "mve_vmulltq_int_<supf><mode>"
1484  [
1485   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
1486	(unspec:<V_double_width> [(match_operand:MVE_2 1 "s_register_operand" "w")
1487				  (match_operand:MVE_2 2 "s_register_operand" "w")]
1488	 VMULLTQ_INT))
1489  ]
1490  "TARGET_HAVE_MVE"
1491  "vmullt.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1492  [(set_attr "type" "mve_move")
1493])
1494
1495;;
1496;; [vmulq_n_u, vmulq_n_s])
1497;;
1498(define_insn "mve_vmulq_n_<supf><mode>"
1499  [
1500   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1501	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1502		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
1503	 VMULQ_N))
1504  ]
1505  "TARGET_HAVE_MVE"
1506  "vmul.i%#<V_sz_elem>\t%q0, %q1, %2"
1507  [(set_attr "type" "mve_move")
1508])
1509
1510;;
1511;; [vmulq_u, vmulq_s])
1512;;
1513(define_insn "mve_vmulq_<supf><mode>"
1514  [
1515   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1516	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1517		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1518	 VMULQ))
1519  ]
1520  "TARGET_HAVE_MVE"
1521  "vmul.i%#<V_sz_elem>\t%q0, %q1, %q2"
1522  [(set_attr "type" "mve_move")
1523])
1524
1525;;
1526;; [vornq_u, vornq_s])
1527;;
1528(define_insn "mve_vornq_<supf><mode>"
1529  [
1530   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1531	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1532		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1533	 VORNQ))
1534  ]
1535  "TARGET_HAVE_MVE"
1536  "vorn %q0, %q1, %q2"
1537  [(set_attr "type" "mve_move")
1538])
1539
1540;;
1541;; [vorrq_s, vorrq_u])
1542;;
1543(define_insn "mve_vorrq_<supf><mode>"
1544  [
1545   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1546	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1547		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1548	 VORRQ))
1549  ]
1550  "TARGET_HAVE_MVE"
1551  "vorr %q0, %q1, %q2"
1552  [(set_attr "type" "mve_move")
1553])
1554
1555;;
1556;; [vqaddq_n_s, vqaddq_n_u])
1557;;
1558(define_insn "mve_vqaddq_n_<supf><mode>"
1559  [
1560   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1561	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1562		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
1563	 VQADDQ_N))
1564  ]
1565  "TARGET_HAVE_MVE"
1566  "vqadd.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
1567  [(set_attr "type" "mve_move")
1568])
1569
1570;;
1571;; [vqaddq_u, vqaddq_s])
1572;;
1573(define_insn "mve_vqaddq_<supf><mode>"
1574  [
1575   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1576	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1577		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1578	 VQADDQ))
1579  ]
1580  "TARGET_HAVE_MVE"
1581  "vqadd.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1582  [(set_attr "type" "mve_move")
1583])
1584
1585;;
1586;; [vqdmulhq_n_s])
1587;;
1588(define_insn "mve_vqdmulhq_n_s<mode>"
1589  [
1590   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1591	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1592		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
1593	 VQDMULHQ_N_S))
1594  ]
1595  "TARGET_HAVE_MVE"
1596  "vqdmulh.s%#<V_sz_elem>\t%q0, %q1, %2"
1597  [(set_attr "type" "mve_move")
1598])
1599
1600;;
1601;; [vqdmulhq_s])
1602;;
1603(define_insn "mve_vqdmulhq_s<mode>"
1604  [
1605   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1606	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1607		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1608	 VQDMULHQ_S))
1609  ]
1610  "TARGET_HAVE_MVE"
1611  "vqdmulh.s%#<V_sz_elem>\t%q0, %q1, %q2"
1612  [(set_attr "type" "mve_move")
1613])
1614
1615;;
1616;; [vqrdmulhq_n_s])
1617;;
1618(define_insn "mve_vqrdmulhq_n_s<mode>"
1619  [
1620   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1621	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1622		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
1623	 VQRDMULHQ_N_S))
1624  ]
1625  "TARGET_HAVE_MVE"
1626  "vqrdmulh.s%#<V_sz_elem>\t%q0, %q1, %2"
1627  [(set_attr "type" "mve_move")
1628])
1629
1630;;
1631;; [vqrdmulhq_s])
1632;;
1633(define_insn "mve_vqrdmulhq_s<mode>"
1634  [
1635   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1636	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1637		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1638	 VQRDMULHQ_S))
1639  ]
1640  "TARGET_HAVE_MVE"
1641  "vqrdmulh.s%#<V_sz_elem>\t%q0, %q1, %q2"
1642  [(set_attr "type" "mve_move")
1643])
1644
1645;;
1646;; [vqrshlq_n_s, vqrshlq_n_u])
1647;;
1648(define_insn "mve_vqrshlq_n_<supf><mode>"
1649  [
1650   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1651	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1652		       (match_operand:SI 2 "s_register_operand" "r")]
1653	 VQRSHLQ_N))
1654  ]
1655  "TARGET_HAVE_MVE"
1656  "vqrshl.<supf>%#<V_sz_elem>\t%q0, %2"
1657  [(set_attr "type" "mve_move")
1658])
1659
1660;;
1661;; [vqrshlq_s, vqrshlq_u])
1662;;
1663(define_insn "mve_vqrshlq_<supf><mode>"
1664  [
1665   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1666	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1667		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1668	 VQRSHLQ))
1669  ]
1670  "TARGET_HAVE_MVE"
1671  "vqrshl.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1672  [(set_attr "type" "mve_move")
1673])
1674
1675;;
1676;; [vqshlq_n_s, vqshlq_n_u])
1677;;
1678(define_insn "mve_vqshlq_n_<supf><mode>"
1679  [
1680   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1681	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1682		       (match_operand:SI 2 "immediate_operand" "i")]
1683	 VQSHLQ_N))
1684  ]
1685  "TARGET_HAVE_MVE"
1686  "vqshl.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
1687  [(set_attr "type" "mve_move")
1688])
1689
1690;;
1691;; [vqshlq_r_u, vqshlq_r_s])
1692;;
1693(define_insn "mve_vqshlq_r_<supf><mode>"
1694  [
1695   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1696	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1697		       (match_operand:SI 2 "s_register_operand" "r")]
1698	 VQSHLQ_R))
1699  ]
1700  "TARGET_HAVE_MVE"
1701  "vqshl.<supf>%#<V_sz_elem>\t%q0, %2"
1702  [(set_attr "type" "mve_move")
1703])
1704
1705;;
1706;; [vqshlq_s, vqshlq_u])
1707;;
1708(define_insn "mve_vqshlq_<supf><mode>"
1709  [
1710   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1711	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1712		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1713	 VQSHLQ))
1714  ]
1715  "TARGET_HAVE_MVE"
1716  "vqshl.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1717  [(set_attr "type" "mve_move")
1718])
1719
1720;;
1721;; [vqshluq_n_s])
1722;;
1723(define_insn "mve_vqshluq_n_s<mode>"
1724  [
1725   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1726	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1727		       (match_operand:SI 2 "mve_imm_7" "Ra")]
1728	 VQSHLUQ_N_S))
1729  ]
1730  "TARGET_HAVE_MVE"
1731  "vqshlu.s%#<V_sz_elem>\t%q0, %q1, %2"
1732  [(set_attr "type" "mve_move")
1733])
1734
1735;;
1736;; [vqsubq_n_s, vqsubq_n_u])
1737;;
1738(define_insn "mve_vqsubq_n_<supf><mode>"
1739  [
1740   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1741	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1742		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
1743	 VQSUBQ_N))
1744  ]
1745  "TARGET_HAVE_MVE"
1746  "vqsub.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
1747  [(set_attr "type" "mve_move")
1748])
1749
1750;;
1751;; [vqsubq_u, vqsubq_s])
1752;;
1753(define_insn "mve_vqsubq_<supf><mode>"
1754  [
1755   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1756	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1757		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1758	 VQSUBQ))
1759  ]
1760  "TARGET_HAVE_MVE"
1761  "vqsub.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1762  [(set_attr "type" "mve_move")
1763])
1764
1765;;
1766;; [vrhaddq_s, vrhaddq_u])
1767;;
1768(define_insn "mve_vrhaddq_<supf><mode>"
1769  [
1770   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1771	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1772		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1773	 VRHADDQ))
1774  ]
1775  "TARGET_HAVE_MVE"
1776  "vrhadd.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1777  [(set_attr "type" "mve_move")
1778])
1779
1780;;
1781;; [vrmulhq_s, vrmulhq_u])
1782;;
1783(define_insn "mve_vrmulhq_<supf><mode>"
1784  [
1785   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1786	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1787		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1788	 VRMULHQ))
1789  ]
1790  "TARGET_HAVE_MVE"
1791  "vrmulh.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1792  [(set_attr "type" "mve_move")
1793])
1794
1795;;
1796;; [vrshlq_n_u, vrshlq_n_s])
1797;;
1798(define_insn "mve_vrshlq_n_<supf><mode>"
1799  [
1800   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1801	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1802		       (match_operand:SI 2 "s_register_operand" "r")]
1803	 VRSHLQ_N))
1804  ]
1805  "TARGET_HAVE_MVE"
1806  "vrshl.<supf>%#<V_sz_elem>\t%q0, %2"
1807  [(set_attr "type" "mve_move")
1808])
1809
1810;;
1811;; [vrshlq_s, vrshlq_u])
1812;;
1813(define_insn "mve_vrshlq_<supf><mode>"
1814  [
1815   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1816	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1817		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1818	 VRSHLQ))
1819  ]
1820  "TARGET_HAVE_MVE"
1821  "vrshl.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1822  [(set_attr "type" "mve_move")
1823])
1824
1825;;
1826;; [vrshrq_n_s, vrshrq_n_u])
1827;;
1828(define_insn "mve_vrshrq_n_<supf><mode>"
1829  [
1830   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1831	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1832		       (match_operand:SI 2 "<MVE_pred2>" "<MVE_constraint2>")]
1833	 VRSHRQ_N))
1834  ]
1835  "TARGET_HAVE_MVE"
1836  "vrshr.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
1837  [(set_attr "type" "mve_move")
1838])
1839
1840;;
1841;; [vshlq_n_u, vshlq_n_s])
1842;;
1843(define_insn "mve_vshlq_n_<supf><mode>"
1844  [
1845   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1846	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1847		       (match_operand:SI 2 "immediate_operand" "i")]
1848	 VSHLQ_N))
1849  ]
1850  "TARGET_HAVE_MVE"
1851  "vshl.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
1852  [(set_attr "type" "mve_move")
1853])
1854
1855;;
1856;; [vshlq_r_s, vshlq_r_u])
1857;;
1858(define_insn "mve_vshlq_r_<supf><mode>"
1859  [
1860   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1861	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1862		       (match_operand:SI 2 "s_register_operand" "r")]
1863	 VSHLQ_R))
1864  ]
1865  "TARGET_HAVE_MVE"
1866  "vshl.<supf>%#<V_sz_elem>\t%q0, %2"
1867  [(set_attr "type" "mve_move")
1868])
1869
1870;;
1871;; [vsubq_n_s, vsubq_n_u])
1872;;
1873(define_insn "mve_vsubq_n_<supf><mode>"
1874  [
1875   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1876	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1877		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
1878	 VSUBQ_N))
1879  ]
1880  "TARGET_HAVE_MVE"
1881  "vsub.i%#<V_sz_elem>\t%q0, %q1, %2"
1882  [(set_attr "type" "mve_move")
1883])
1884
1885;;
1886;; [vsubq_s, vsubq_u])
1887;;
1888(define_insn "mve_vsubq_<supf><mode>"
1889  [
1890   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1891	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1892		       (match_operand:MVE_2 2 "s_register_operand" "w")]
1893	 VSUBQ))
1894  ]
1895  "TARGET_HAVE_MVE"
1896  "vsub.i%#<V_sz_elem>\t%q0, %q1, %q2"
1897  [(set_attr "type" "mve_move")
1898])
1899
1900;;
1901;; [vabdq_f])
1902;;
1903(define_insn "mve_vabdq_f<mode>"
1904  [
1905   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1906	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
1907		       (match_operand:MVE_0 2 "s_register_operand" "w")]
1908	 VABDQ_F))
1909  ]
1910  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1911  "vabd.f%#<V_sz_elem>	%q0, %q1, %q2"
1912  [(set_attr "type" "mve_move")
1913])
1914
1915;;
1916;; [vaddlvaq_s vaddlvaq_u])
1917;;
1918(define_insn "mve_vaddlvaq_<supf>v4si"
1919  [
1920   (set (match_operand:DI 0 "s_register_operand" "=r")
1921	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
1922		    (match_operand:V4SI 2 "s_register_operand" "w")]
1923	 VADDLVAQ))
1924  ]
1925  "TARGET_HAVE_MVE"
1926  "vaddlva.<supf>32 %Q0, %R0, %q2"
1927  [(set_attr "type" "mve_move")
1928])
1929
1930;;
1931;; [vaddq_n_f])
1932;;
1933(define_insn "mve_vaddq_n_f<mode>"
1934  [
1935   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1936	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
1937		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
1938	 VADDQ_N_F))
1939  ]
1940  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1941  "vadd.f%#<V_sz_elem>	%q0, %q1, %2"
1942  [(set_attr "type" "mve_move")
1943])
1944
1945;;
1946;; [vandq_f])
1947;;
1948(define_insn "mve_vandq_f<mode>"
1949  [
1950   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1951	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
1952		       (match_operand:MVE_0 2 "s_register_operand" "w")]
1953	 VANDQ_F))
1954  ]
1955  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1956  "vand %q0, %q1, %q2"
1957  [(set_attr "type" "mve_move")
1958])
1959
1960;;
1961;; [vbicq_f])
1962;;
1963(define_insn "mve_vbicq_f<mode>"
1964  [
1965   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1966	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
1967		       (match_operand:MVE_0 2 "s_register_operand" "w")]
1968	 VBICQ_F))
1969  ]
1970  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1971  "vbic %q0, %q1, %q2"
1972  [(set_attr "type" "mve_move")
1973])
1974
1975;;
1976;; [vbicq_n_s, vbicq_n_u])
1977;;
1978(define_insn "mve_vbicq_n_<supf><mode>"
1979  [
1980   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
1981	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
1982		       (match_operand:SI 2 "immediate_operand" "i")]
1983	 VBICQ_N))
1984  ]
1985  "TARGET_HAVE_MVE"
1986  "vbic.i%#<V_sz_elem>	%q0, %2"
1987  [(set_attr "type" "mve_move")
1988])
1989
1990;;
1991;; [vcaddq_rot270_f])
1992;;
1993(define_insn "mve_vcaddq_rot270_f<mode>"
1994  [
1995   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
1996	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
1997		       (match_operand:MVE_0 2 "s_register_operand" "w")]
1998	 VCADDQ_ROT270_F))
1999  ]
2000  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2001  "vcadd.f%#<V_sz_elem>	%q0, %q1, %q2, #270"
2002  [(set_attr "type" "mve_move")
2003])
2004
2005;;
2006;; [vcaddq_rot90_f])
2007;;
2008(define_insn "mve_vcaddq_rot90_f<mode>"
2009  [
2010   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
2011	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2012		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2013	 VCADDQ_ROT90_F))
2014  ]
2015  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2016  "vcadd.f%#<V_sz_elem>	%q0, %q1, %q2, #90"
2017  [(set_attr "type" "mve_move")
2018])
2019
2020;;
2021;; [vcmpeqq_f])
2022;;
2023(define_insn "mve_vcmpeqq_f<mode>"
2024  [
2025   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2026	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2027		    (match_operand:MVE_0 2 "s_register_operand" "w")]
2028	 VCMPEQQ_F))
2029  ]
2030  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2031  "vcmp.f%#<V_sz_elem>	eq, %q1, %q2"
2032  [(set_attr "type" "mve_move")
2033])
2034
2035;;
2036;; [vcmpeqq_n_f])
2037;;
2038(define_insn "mve_vcmpeqq_n_f<mode>"
2039  [
2040   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2041	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2042		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
2043	 VCMPEQQ_N_F))
2044  ]
2045  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2046  "vcmp.f%#<V_sz_elem>	eq, %q1, %2"
2047  [(set_attr "type" "mve_move")
2048])
2049
2050;;
2051;; [vcmpgeq_f])
2052;;
2053(define_insn "mve_vcmpgeq_f<mode>"
2054  [
2055   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2056	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2057		    (match_operand:MVE_0 2 "s_register_operand" "w")]
2058	 VCMPGEQ_F))
2059  ]
2060  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2061  "vcmp.f%#<V_sz_elem>	ge, %q1, %q2"
2062  [(set_attr "type" "mve_move")
2063])
2064
2065;;
2066;; [vcmpgeq_n_f])
2067;;
2068(define_insn "mve_vcmpgeq_n_f<mode>"
2069  [
2070   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2071	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2072		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
2073	 VCMPGEQ_N_F))
2074  ]
2075  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2076  "vcmp.f%#<V_sz_elem>	ge, %q1, %2"
2077  [(set_attr "type" "mve_move")
2078])
2079
2080;;
2081;; [vcmpgtq_f])
2082;;
2083(define_insn "mve_vcmpgtq_f<mode>"
2084  [
2085   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2086	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2087		    (match_operand:MVE_0 2 "s_register_operand" "w")]
2088	 VCMPGTQ_F))
2089  ]
2090  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2091  "vcmp.f%#<V_sz_elem>	gt, %q1, %q2"
2092  [(set_attr "type" "mve_move")
2093])
2094
2095;;
2096;; [vcmpgtq_n_f])
2097;;
2098(define_insn "mve_vcmpgtq_n_f<mode>"
2099  [
2100   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2101	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2102		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
2103	 VCMPGTQ_N_F))
2104  ]
2105  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2106  "vcmp.f%#<V_sz_elem>	gt, %q1, %2"
2107  [(set_attr "type" "mve_move")
2108])
2109
2110;;
2111;; [vcmpleq_f])
2112;;
2113(define_insn "mve_vcmpleq_f<mode>"
2114  [
2115   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2116	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2117		    (match_operand:MVE_0 2 "s_register_operand" "w")]
2118	 VCMPLEQ_F))
2119  ]
2120  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2121  "vcmp.f%#<V_sz_elem>	le, %q1, %q2"
2122  [(set_attr "type" "mve_move")
2123])
2124
2125;;
2126;; [vcmpleq_n_f])
2127;;
2128(define_insn "mve_vcmpleq_n_f<mode>"
2129  [
2130   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2131	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2132		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
2133	 VCMPLEQ_N_F))
2134  ]
2135  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2136  "vcmp.f%#<V_sz_elem>	le, %q1, %2"
2137  [(set_attr "type" "mve_move")
2138])
2139
2140;;
2141;; [vcmpltq_f])
2142;;
2143(define_insn "mve_vcmpltq_f<mode>"
2144  [
2145   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2146	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2147		    (match_operand:MVE_0 2 "s_register_operand" "w")]
2148	 VCMPLTQ_F))
2149  ]
2150  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2151  "vcmp.f%#<V_sz_elem>	lt, %q1, %q2"
2152  [(set_attr "type" "mve_move")
2153])
2154
2155;;
2156;; [vcmpltq_n_f])
2157;;
2158(define_insn "mve_vcmpltq_n_f<mode>"
2159  [
2160   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2161	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2162		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
2163	 VCMPLTQ_N_F))
2164  ]
2165  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2166  "vcmp.f%#<V_sz_elem>	lt, %q1, %2"
2167  [(set_attr "type" "mve_move")
2168])
2169
2170;;
2171;; [vcmpneq_f])
2172;;
2173(define_insn "mve_vcmpneq_f<mode>"
2174  [
2175   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2176	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2177		    (match_operand:MVE_0 2 "s_register_operand" "w")]
2178	 VCMPNEQ_F))
2179  ]
2180  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2181  "vcmp.f%#<V_sz_elem>	ne, %q1, %q2"
2182  [(set_attr "type" "mve_move")
2183])
2184
2185;;
2186;; [vcmpneq_n_f])
2187;;
2188(define_insn "mve_vcmpneq_n_f<mode>"
2189  [
2190   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2191	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2192		    (match_operand:<V_elem> 2 "s_register_operand" "r")]
2193	 VCMPNEQ_N_F))
2194  ]
2195  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2196  "vcmp.f%#<V_sz_elem>	ne, %q1, %2"
2197  [(set_attr "type" "mve_move")
2198])
2199
2200;;
2201;; [vcmulq_f])
2202;;
2203(define_insn "mve_vcmulq_f<mode>"
2204  [
2205   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
2206	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2207		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2208	 VCMULQ_F))
2209  ]
2210  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2211  "vcmul.f%#<V_sz_elem>	%q0, %q1, %q2, #0"
2212  [(set_attr "type" "mve_move")
2213])
2214
2215;;
2216;; [vcmulq_rot180_f])
2217;;
2218(define_insn "mve_vcmulq_rot180_f<mode>"
2219  [
2220   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
2221	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2222		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2223	 VCMULQ_ROT180_F))
2224  ]
2225  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2226  "vcmul.f%#<V_sz_elem>	%q0, %q1, %q2, #180"
2227  [(set_attr "type" "mve_move")
2228])
2229
2230;;
2231;; [vcmulq_rot270_f])
2232;;
2233(define_insn "mve_vcmulq_rot270_f<mode>"
2234  [
2235   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
2236	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2237		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2238	 VCMULQ_ROT270_F))
2239  ]
2240  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2241  "vcmul.f%#<V_sz_elem>	%q0, %q1, %q2, #270"
2242  [(set_attr "type" "mve_move")
2243])
2244
2245;;
2246;; [vcmulq_rot90_f])
2247;;
2248(define_insn "mve_vcmulq_rot90_f<mode>"
2249  [
2250   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
2251	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2252		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2253	 VCMULQ_ROT90_F))
2254  ]
2255  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2256  "vcmul.f%#<V_sz_elem>	%q0, %q1, %q2, #90"
2257  [(set_attr "type" "mve_move")
2258])
2259
2260;;
2261;; [vctp8q_m vctp16q_m vctp32q_m vctp64q_m])
2262;;
2263(define_insn "mve_vctp<mode1>q_mhi"
2264  [
2265   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2266	(unspec:HI [(match_operand:SI 1 "s_register_operand" "r")
2267		    (match_operand:HI 2 "vpr_register_operand" "Up")]
2268	 VCTPQ_M))
2269  ]
2270  "TARGET_HAVE_MVE"
2271  "vpst\;vctpt.<mode1> %1"
2272  [(set_attr "type" "mve_move")
2273   (set_attr "length""8")])
2274
2275;;
2276;; [vcvtbq_f16_f32])
2277;;
2278(define_insn "mve_vcvtbq_f16_f32v8hf"
2279  [
2280   (set (match_operand:V8HF 0 "s_register_operand" "=w")
2281	(unspec:V8HF [(match_operand:V8HF 1 "s_register_operand" "0")
2282		      (match_operand:V4SF 2 "s_register_operand" "w")]
2283	 VCVTBQ_F16_F32))
2284  ]
2285  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2286  "vcvtb.f16.f32 %q0, %q2"
2287  [(set_attr "type" "mve_move")
2288])
2289
2290;;
2291;; [vcvttq_f16_f32])
2292;;
2293(define_insn "mve_vcvttq_f16_f32v8hf"
2294  [
2295   (set (match_operand:V8HF 0 "s_register_operand" "=w")
2296	(unspec:V8HF [(match_operand:V8HF 1 "s_register_operand" "0")
2297		      (match_operand:V4SF 2 "s_register_operand" "w")]
2298	 VCVTTQ_F16_F32))
2299  ]
2300  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2301  "vcvtt.f16.f32 %q0, %q2"
2302  [(set_attr "type" "mve_move")
2303])
2304
2305;;
2306;; [veorq_f])
2307;;
2308(define_insn "mve_veorq_f<mode>"
2309  [
2310   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2311	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2312		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2313	 VEORQ_F))
2314  ]
2315  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2316  "veor %q0, %q1, %q2"
2317  [(set_attr "type" "mve_move")
2318])
2319
2320;;
2321;; [vmaxnmaq_f])
2322;;
2323(define_insn "mve_vmaxnmaq_f<mode>"
2324  [
2325   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2326	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
2327		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2328	 VMAXNMAQ_F))
2329  ]
2330  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2331  "vmaxnma.f%#<V_sz_elem>	%q0, %q2"
2332  [(set_attr "type" "mve_move")
2333])
2334
2335;;
2336;; [vmaxnmavq_f])
2337;;
2338(define_insn "mve_vmaxnmavq_f<mode>"
2339  [
2340   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
2341	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
2342			  (match_operand:MVE_0 2 "s_register_operand" "w")]
2343	 VMAXNMAVQ_F))
2344  ]
2345  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2346  "vmaxnmav.f%#<V_sz_elem>	%0, %q2"
2347  [(set_attr "type" "mve_move")
2348])
2349
2350;;
2351;; [vmaxnmq_f])
2352;;
2353(define_insn "mve_vmaxnmq_f<mode>"
2354  [
2355   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2356	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2357		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2358	 VMAXNMQ_F))
2359  ]
2360  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2361  "vmaxnm.f%#<V_sz_elem>	%q0, %q1, %q2"
2362  [(set_attr "type" "mve_move")
2363])
2364
2365;;
2366;; [vmaxnmvq_f])
2367;;
2368(define_insn "mve_vmaxnmvq_f<mode>"
2369  [
2370   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
2371	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
2372			  (match_operand:MVE_0 2 "s_register_operand" "w")]
2373	 VMAXNMVQ_F))
2374  ]
2375  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2376  "vmaxnmv.f%#<V_sz_elem>	%0, %q2"
2377  [(set_attr "type" "mve_move")
2378])
2379
2380;;
2381;; [vminnmaq_f])
2382;;
2383(define_insn "mve_vminnmaq_f<mode>"
2384  [
2385   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2386	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
2387		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2388	 VMINNMAQ_F))
2389  ]
2390  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2391  "vminnma.f%#<V_sz_elem>	%q0, %q2"
2392  [(set_attr "type" "mve_move")
2393])
2394
2395;;
2396;; [vminnmavq_f])
2397;;
2398(define_insn "mve_vminnmavq_f<mode>"
2399  [
2400   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
2401	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
2402			  (match_operand:MVE_0 2 "s_register_operand" "w")]
2403	 VMINNMAVQ_F))
2404  ]
2405  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2406  "vminnmav.f%#<V_sz_elem>	%0, %q2"
2407  [(set_attr "type" "mve_move")
2408])
2409
2410;;
2411;; [vminnmq_f])
2412;;
2413(define_insn "mve_vminnmq_f<mode>"
2414  [
2415   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2416	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2417		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2418	 VMINNMQ_F))
2419  ]
2420  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2421  "vminnm.f%#<V_sz_elem>	%q0, %q1, %q2"
2422  [(set_attr "type" "mve_move")
2423])
2424
2425;;
2426;; [vminnmvq_f])
2427;;
2428(define_insn "mve_vminnmvq_f<mode>"
2429  [
2430   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
2431	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
2432			  (match_operand:MVE_0 2 "s_register_operand" "w")]
2433	 VMINNMVQ_F))
2434  ]
2435  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2436  "vminnmv.f%#<V_sz_elem>	%0, %q2"
2437  [(set_attr "type" "mve_move")
2438])
2439
2440;;
2441;; [vmlaldavq_u, vmlaldavq_s])
2442;;
2443(define_insn "mve_vmlaldavq_<supf><mode>"
2444  [
2445   (set (match_operand:DI 0 "s_register_operand" "=r")
2446	(unspec:DI [(match_operand:MVE_5 1 "s_register_operand" "w")
2447		    (match_operand:MVE_5 2 "s_register_operand" "w")]
2448	 VMLALDAVQ))
2449  ]
2450  "TARGET_HAVE_MVE"
2451  "vmlaldav.<supf>%#<V_sz_elem>	%Q0, %R0, %q1, %q2"
2452  [(set_attr "type" "mve_move")
2453])
2454
2455;;
2456;; [vmlaldavxq_s])
2457;;
2458(define_insn "mve_vmlaldavxq_s<mode>"
2459  [
2460   (set (match_operand:DI 0 "s_register_operand" "=r")
2461	(unspec:DI [(match_operand:MVE_5 1 "s_register_operand" "w")
2462		    (match_operand:MVE_5 2 "s_register_operand" "w")]
2463	 VMLALDAVXQ_S))
2464  ]
2465  "TARGET_HAVE_MVE"
2466  "vmlaldavx.s%#<V_sz_elem> %Q0, %R0, %q1, %q2"
2467  [(set_attr "type" "mve_move")
2468])
2469
2470;;
2471;; [vmlsldavq_s])
2472;;
2473(define_insn "mve_vmlsldavq_s<mode>"
2474  [
2475   (set (match_operand:DI 0 "s_register_operand" "=r")
2476	(unspec:DI [(match_operand:MVE_5 1 "s_register_operand" "w")
2477		    (match_operand:MVE_5 2 "s_register_operand" "w")]
2478	 VMLSLDAVQ_S))
2479  ]
2480  "TARGET_HAVE_MVE"
2481  "vmlsldav.s%#<V_sz_elem> %Q0, %R0, %q1, %q2"
2482  [(set_attr "type" "mve_move")
2483])
2484
2485;;
2486;; [vmlsldavxq_s])
2487;;
2488(define_insn "mve_vmlsldavxq_s<mode>"
2489  [
2490   (set (match_operand:DI 0 "s_register_operand" "=r")
2491	(unspec:DI [(match_operand:MVE_5 1 "s_register_operand" "w")
2492		    (match_operand:MVE_5 2 "s_register_operand" "w")]
2493	 VMLSLDAVXQ_S))
2494  ]
2495  "TARGET_HAVE_MVE"
2496  "vmlsldavx.s%#<V_sz_elem> %Q0, %R0, %q1, %q2"
2497  [(set_attr "type" "mve_move")
2498])
2499
2500;;
2501;; [vmovnbq_u, vmovnbq_s])
2502;;
2503(define_insn "mve_vmovnbq_<supf><mode>"
2504  [
2505   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
2506	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
2507				 (match_operand:MVE_5 2 "s_register_operand" "w")]
2508	 VMOVNBQ))
2509  ]
2510  "TARGET_HAVE_MVE"
2511  "vmovnb.i%#<V_sz_elem>	%q0, %q2"
2512  [(set_attr "type" "mve_move")
2513])
2514
2515;;
2516;; [vmovntq_s, vmovntq_u])
2517;;
2518(define_insn "mve_vmovntq_<supf><mode>"
2519  [
2520   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
2521	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
2522				 (match_operand:MVE_5 2 "s_register_operand" "w")]
2523	 VMOVNTQ))
2524  ]
2525  "TARGET_HAVE_MVE"
2526  "vmovnt.i%#<V_sz_elem>	%q0, %q2"
2527  [(set_attr "type" "mve_move")
2528])
2529
2530;;
2531;; [vmulq_f])
2532;;
2533(define_insn "mve_vmulq_f<mode>"
2534  [
2535   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2536	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2537		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2538	 VMULQ_F))
2539  ]
2540  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2541  "vmul.f%#<V_sz_elem>	%q0, %q1, %q2"
2542  [(set_attr "type" "mve_move")
2543])
2544
2545;;
2546;; [vmulq_n_f])
2547;;
2548(define_insn "mve_vmulq_n_f<mode>"
2549  [
2550   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2551	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2552		       (match_operand:<V_elem> 2 "s_register_operand" "r")]
2553	 VMULQ_N_F))
2554  ]
2555  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2556  "vmul.f%#<V_sz_elem>	%q0, %q1, %2"
2557  [(set_attr "type" "mve_move")
2558])
2559
2560;;
2561;; [vornq_f])
2562;;
2563(define_insn "mve_vornq_f<mode>"
2564  [
2565   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2566	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2567		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2568	 VORNQ_F))
2569  ]
2570  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2571  "vorn %q0, %q1, %q2"
2572  [(set_attr "type" "mve_move")
2573])
2574
2575;;
2576;; [vorrq_f])
2577;;
2578(define_insn "mve_vorrq_f<mode>"
2579  [
2580   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2581	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2582		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2583	 VORRQ_F))
2584  ]
2585  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2586  "vorr %q0, %q1, %q2"
2587  [(set_attr "type" "mve_move")
2588])
2589
2590;;
2591;; [vorrq_n_u, vorrq_n_s])
2592;;
2593(define_insn "mve_vorrq_n_<supf><mode>"
2594  [
2595   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
2596	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
2597		       (match_operand:SI 2 "immediate_operand" "i")]
2598	 VORRQ_N))
2599  ]
2600  "TARGET_HAVE_MVE"
2601  "vorr.i%#<V_sz_elem>	%q0, %2"
2602  [(set_attr "type" "mve_move")
2603])
2604
2605;;
2606;; [vqdmullbq_n_s])
2607;;
2608(define_insn "mve_vqdmullbq_n_s<mode>"
2609  [
2610   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
2611	(unspec:<V_double_width> [(match_operand:MVE_5 1 "s_register_operand" "w")
2612				  (match_operand:<V_elem> 2 "s_register_operand" "r")]
2613	 VQDMULLBQ_N_S))
2614  ]
2615  "TARGET_HAVE_MVE"
2616  "vqdmullb.s%#<V_sz_elem>	%q0, %q1, %2"
2617  [(set_attr "type" "mve_move")
2618])
2619
2620;;
2621;; [vqdmullbq_s])
2622;;
2623(define_insn "mve_vqdmullbq_s<mode>"
2624  [
2625   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
2626	(unspec:<V_double_width> [(match_operand:MVE_5 1 "s_register_operand" "w")
2627				  (match_operand:MVE_5 2 "s_register_operand" "w")]
2628	 VQDMULLBQ_S))
2629  ]
2630  "TARGET_HAVE_MVE"
2631  "vqdmullb.s%#<V_sz_elem>	%q0, %q1, %q2"
2632  [(set_attr "type" "mve_move")
2633])
2634
2635;;
2636;; [vqdmulltq_n_s])
2637;;
2638(define_insn "mve_vqdmulltq_n_s<mode>"
2639  [
2640   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
2641	(unspec:<V_double_width> [(match_operand:MVE_5 1 "s_register_operand" "w")
2642				  (match_operand:<V_elem> 2 "s_register_operand" "r")]
2643	 VQDMULLTQ_N_S))
2644  ]
2645  "TARGET_HAVE_MVE"
2646  "vqdmullt.s%#<V_sz_elem>	%q0, %q1, %2"
2647  [(set_attr "type" "mve_move")
2648])
2649
2650;;
2651;; [vqdmulltq_s])
2652;;
2653(define_insn "mve_vqdmulltq_s<mode>"
2654  [
2655   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
2656	(unspec:<V_double_width> [(match_operand:MVE_5 1 "s_register_operand" "w")
2657				  (match_operand:MVE_5 2 "s_register_operand" "w")]
2658	 VQDMULLTQ_S))
2659  ]
2660  "TARGET_HAVE_MVE"
2661  "vqdmullt.s%#<V_sz_elem>	%q0, %q1, %q2"
2662  [(set_attr "type" "mve_move")
2663])
2664
2665;;
2666;; [vqmovnbq_u, vqmovnbq_s])
2667;;
2668(define_insn "mve_vqmovnbq_<supf><mode>"
2669  [
2670   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
2671	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
2672				 (match_operand:MVE_5 2 "s_register_operand" "w")]
2673	 VQMOVNBQ))
2674  ]
2675  "TARGET_HAVE_MVE"
2676  "vqmovnb.<supf>%#<V_sz_elem>	%q0, %q2"
2677  [(set_attr "type" "mve_move")
2678])
2679
2680;;
2681;; [vqmovntq_u, vqmovntq_s])
2682;;
2683(define_insn "mve_vqmovntq_<supf><mode>"
2684  [
2685   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
2686	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
2687				 (match_operand:MVE_5 2 "s_register_operand" "w")]
2688	 VQMOVNTQ))
2689  ]
2690  "TARGET_HAVE_MVE"
2691  "vqmovnt.<supf>%#<V_sz_elem>	%q0, %q2"
2692  [(set_attr "type" "mve_move")
2693])
2694
2695;;
2696;; [vqmovunbq_s])
2697;;
2698(define_insn "mve_vqmovunbq_s<mode>"
2699  [
2700   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
2701	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
2702				 (match_operand:MVE_5 2 "s_register_operand" "w")]
2703	 VQMOVUNBQ_S))
2704  ]
2705  "TARGET_HAVE_MVE"
2706  "vqmovunb.s%#<V_sz_elem>	%q0, %q2"
2707  [(set_attr "type" "mve_move")
2708])
2709
2710;;
2711;; [vqmovuntq_s])
2712;;
2713(define_insn "mve_vqmovuntq_s<mode>"
2714  [
2715   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
2716	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
2717				 (match_operand:MVE_5 2 "s_register_operand" "w")]
2718	 VQMOVUNTQ_S))
2719  ]
2720  "TARGET_HAVE_MVE"
2721  "vqmovunt.s%#<V_sz_elem>	%q0, %q2"
2722  [(set_attr "type" "mve_move")
2723])
2724
2725;;
2726;; [vrmlaldavhxq_s])
2727;;
2728(define_insn "mve_vrmlaldavhxq_sv4si"
2729  [
2730   (set (match_operand:DI 0 "s_register_operand" "=r")
2731	(unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
2732		    (match_operand:V4SI 2 "s_register_operand" "w")]
2733	 VRMLALDAVHXQ_S))
2734  ]
2735  "TARGET_HAVE_MVE"
2736  "vrmlaldavhx.s32 %Q0, %R0, %q1, %q2"
2737  [(set_attr "type" "mve_move")
2738])
2739
2740;;
2741;; [vrmlsldavhq_s])
2742;;
2743(define_insn "mve_vrmlsldavhq_sv4si"
2744  [
2745   (set (match_operand:DI 0 "s_register_operand" "=r")
2746	(unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
2747		    (match_operand:V4SI 2 "s_register_operand" "w")]
2748	 VRMLSLDAVHQ_S))
2749  ]
2750  "TARGET_HAVE_MVE"
2751  "vrmlsldavh.s32\t%Q0, %R0, %q1, %q2"
2752  [(set_attr "type" "mve_move")
2753])
2754
2755;;
2756;; [vrmlsldavhxq_s])
2757;;
2758(define_insn "mve_vrmlsldavhxq_sv4si"
2759  [
2760   (set (match_operand:DI 0 "s_register_operand" "=r")
2761	(unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
2762		    (match_operand:V4SI 2 "s_register_operand" "w")]
2763	 VRMLSLDAVHXQ_S))
2764  ]
2765  "TARGET_HAVE_MVE"
2766  "vrmlsldavhx.s32\t%Q0, %R0, %q1, %q2"
2767  [(set_attr "type" "mve_move")
2768])
2769
2770;;
2771;; [vshllbq_n_s, vshllbq_n_u])
2772;;
2773(define_insn "mve_vshllbq_n_<supf><mode>"
2774  [
2775   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
2776	(unspec:<V_double_width> [(match_operand:MVE_3 1 "s_register_operand" "w")
2777				  (match_operand:SI 2 "immediate_operand" "i")]
2778	 VSHLLBQ_N))
2779  ]
2780  "TARGET_HAVE_MVE"
2781  "vshllb.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
2782  [(set_attr "type" "mve_move")
2783])
2784
2785;;
2786;; [vshlltq_n_u, vshlltq_n_s])
2787;;
2788(define_insn "mve_vshlltq_n_<supf><mode>"
2789  [
2790   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
2791	(unspec:<V_double_width> [(match_operand:MVE_3 1 "s_register_operand" "w")
2792				  (match_operand:SI 2 "immediate_operand" "i")]
2793	 VSHLLTQ_N))
2794  ]
2795  "TARGET_HAVE_MVE"
2796  "vshllt.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
2797  [(set_attr "type" "mve_move")
2798])
2799
2800;;
2801;; [vsubq_f])
2802;;
2803(define_insn "mve_vsubq_f<mode>"
2804  [
2805   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2806	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2807		       (match_operand:MVE_0 2 "s_register_operand" "w")]
2808	 VSUBQ_F))
2809  ]
2810  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2811  "vsub.f%#<V_sz_elem>\t%q0, %q1, %q2"
2812  [(set_attr "type" "mve_move")
2813])
2814
2815;;
2816;; [vmulltq_poly_p])
2817;;
2818(define_insn "mve_vmulltq_poly_p<mode>"
2819  [
2820   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
2821	(unspec:<V_double_width> [(match_operand:MVE_3 1 "s_register_operand" "w")
2822				  (match_operand:MVE_3 2 "s_register_operand" "w")]
2823	 VMULLTQ_POLY_P))
2824  ]
2825  "TARGET_HAVE_MVE"
2826  "vmullt.p%#<V_sz_elem>\t%q0, %q1, %q2"
2827  [(set_attr "type" "mve_move")
2828])
2829
2830;;
2831;; [vmullbq_poly_p])
2832;;
2833(define_insn "mve_vmullbq_poly_p<mode>"
2834  [
2835   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
2836	(unspec:<V_double_width> [(match_operand:MVE_3 1 "s_register_operand" "w")
2837				  (match_operand:MVE_3 2 "s_register_operand" "w")]
2838	 VMULLBQ_POLY_P))
2839  ]
2840  "TARGET_HAVE_MVE"
2841  "vmullb.p%#<V_sz_elem>\t%q0, %q1, %q2"
2842  [(set_attr "type" "mve_move")
2843])
2844
2845;;
2846;; [vrmlaldavhq_u vrmlaldavhq_s])
2847;;
2848(define_insn "mve_vrmlaldavhq_<supf>v4si"
2849  [
2850   (set (match_operand:DI 0 "s_register_operand" "=r")
2851	(unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
2852		    (match_operand:V4SI 2 "s_register_operand" "w")]
2853	 VRMLALDAVHQ))
2854  ]
2855  "TARGET_HAVE_MVE"
2856  "vrmlaldavh.<supf>32 %Q0, %R0, %q1, %q2"
2857  [(set_attr "type" "mve_move")
2858])
2859
2860;;
2861;; [vbicq_m_n_s, vbicq_m_n_u])
2862;;
2863(define_insn "mve_vbicq_m_n_<supf><mode>"
2864  [
2865   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
2866	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
2867		       (match_operand:SI 2 "immediate_operand" "i")
2868		       (match_operand:HI 3 "vpr_register_operand" "Up")]
2869	 VBICQ_M_N))
2870  ]
2871  "TARGET_HAVE_MVE"
2872  "vpst\;vbict.i%#<V_sz_elem>	%q0, %2"
2873  [(set_attr "type" "mve_move")
2874   (set_attr "length""8")])
2875;;
2876;; [vcmpeqq_m_f])
2877;;
2878(define_insn "mve_vcmpeqq_m_f<mode>"
2879  [
2880   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
2881	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
2882		    (match_operand:MVE_0 2 "s_register_operand" "w")
2883		    (match_operand:HI 3 "vpr_register_operand" "Up")]
2884	 VCMPEQQ_M_F))
2885  ]
2886  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2887  "vpst\;vcmpt.f%#<V_sz_elem>	eq, %q1, %q2"
2888  [(set_attr "type" "mve_move")
2889   (set_attr "length""8")])
2890;;
2891;; [vcvtaq_m_u, vcvtaq_m_s])
2892;;
2893(define_insn "mve_vcvtaq_m_<supf><mode>"
2894  [
2895   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
2896	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
2897		       (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
2898		       (match_operand:HI 3 "vpr_register_operand" "Up")]
2899	 VCVTAQ_M))
2900  ]
2901  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2902  "vpst\;vcvtat.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2"
2903  [(set_attr "type" "mve_move")
2904   (set_attr "length""8")])
2905;;
2906;; [vcvtq_m_to_f_s, vcvtq_m_to_f_u])
2907;;
2908(define_insn "mve_vcvtq_m_to_f_<supf><mode>"
2909  [
2910   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2911	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
2912		       (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
2913		       (match_operand:HI 3 "vpr_register_operand" "Up")]
2914	 VCVTQ_M_TO_F))
2915  ]
2916  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2917  "vpst\;vcvtt.f%#<V_sz_elem>.<supf>%#<V_sz_elem>	 %q0, %q2"
2918  [(set_attr "type" "mve_move")
2919   (set_attr "length""8")])
2920;;
2921;; [vqrshrnbq_n_u, vqrshrnbq_n_s])
2922;;
2923(define_insn "mve_vqrshrnbq_n_<supf><mode>"
2924  [
2925   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
2926	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
2927				 (match_operand:MVE_5 2 "s_register_operand" "w")
2928				 (match_operand:SI 3 "mve_imm_8" "Rb")]
2929	 VQRSHRNBQ_N))
2930  ]
2931  "TARGET_HAVE_MVE"
2932  "vqrshrnb.<supf>%#<V_sz_elem>	%q0, %q2, %3"
2933  [(set_attr "type" "mve_move")
2934])
2935;;
2936;; [vqrshrunbq_n_s])
2937;;
2938(define_insn "mve_vqrshrunbq_n_s<mode>"
2939  [
2940   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
2941	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
2942				 (match_operand:MVE_5 2 "s_register_operand" "w")
2943				 (match_operand:SI 3 "mve_imm_8" "Rb")]
2944	 VQRSHRUNBQ_N_S))
2945  ]
2946  "TARGET_HAVE_MVE"
2947  "vqrshrunb.s%#<V_sz_elem>\t%q0, %q2, %3"
2948  [(set_attr "type" "mve_move")
2949])
2950;;
2951;; [vrmlaldavhaq_s vrmlaldavhaq_u])
2952;;
2953(define_insn "mve_vrmlaldavhaq_<supf>v4si"
2954  [
2955   (set (match_operand:DI 0 "s_register_operand" "=r")
2956	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
2957		    (match_operand:V4SI 2 "s_register_operand" "w")
2958		    (match_operand:V4SI 3 "s_register_operand" "w")]
2959	 VRMLALDAVHAQ))
2960  ]
2961  "TARGET_HAVE_MVE"
2962  "vrmlaldavha.<supf>32 %Q0, %R0, %q2, %q3"
2963  [(set_attr "type" "mve_move")
2964])
2965
2966;;
2967;; [vabavq_s, vabavq_u])
2968;;
2969(define_insn "mve_vabavq_<supf><mode>"
2970  [
2971   (set (match_operand:SI 0 "s_register_operand" "=r")
2972	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
2973		    (match_operand:MVE_2 2 "s_register_operand" "w")
2974		    (match_operand:MVE_2 3 "s_register_operand" "w")]
2975	 VABAVQ))
2976  ]
2977  "TARGET_HAVE_MVE"
2978  "vabav.<supf>%#<V_sz_elem>\t%0, %q2, %q3"
2979  [(set_attr "type" "mve_move")
2980])
2981
2982;;
2983;; [vshlcq_u vshlcq_s]
2984;;
2985(define_expand "mve_vshlcq_vec_<supf><mode>"
2986 [(match_operand:MVE_2 0 "s_register_operand")
2987  (match_operand:MVE_2 1 "s_register_operand")
2988  (match_operand:SI 2 "s_register_operand")
2989  (match_operand:SI 3 "mve_imm_32")
2990  (unspec:MVE_2 [(const_int 0)] VSHLCQ)]
2991 "TARGET_HAVE_MVE"
2992{
2993  rtx ignore_wb = gen_reg_rtx (SImode);
2994  emit_insn(gen_mve_vshlcq_<supf><mode>(operands[0], ignore_wb, operands[1],
2995				      operands[2], operands[3]));
2996  DONE;
2997})
2998
2999(define_expand "mve_vshlcq_carry_<supf><mode>"
3000 [(match_operand:SI 0 "s_register_operand")
3001  (match_operand:MVE_2 1 "s_register_operand")
3002  (match_operand:SI 2 "s_register_operand")
3003  (match_operand:SI 3 "mve_imm_32")
3004  (unspec:MVE_2 [(const_int 0)] VSHLCQ)]
3005 "TARGET_HAVE_MVE"
3006{
3007  rtx ignore_vec = gen_reg_rtx (<MODE>mode);
3008  emit_insn(gen_mve_vshlcq_<supf><mode>(ignore_vec, operands[0], operands[1],
3009				      operands[2], operands[3]));
3010  DONE;
3011})
3012
3013(define_insn "mve_vshlcq_<supf><mode>"
3014 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
3015       (unspec:MVE_2 [(match_operand:MVE_2 2 "s_register_operand" "0")
3016		      (match_operand:SI 3 "s_register_operand" "1")
3017		      (match_operand:SI 4 "mve_imm_32" "Rf")]
3018	VSHLCQ))
3019  (set (match_operand:SI  1 "s_register_operand" "=r")
3020       (unspec:SI [(match_dup 2)
3021		   (match_dup 3)
3022		   (match_dup 4)]
3023	VSHLCQ))]
3024 "TARGET_HAVE_MVE"
3025 "vshlc %q0, %1, %4")
3026
3027;;
3028;; [vabsq_m_s])
3029;;
3030(define_insn "mve_vabsq_m_s<mode>"
3031  [
3032   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3033	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3034		       (match_operand:MVE_2 2 "s_register_operand" "w")
3035		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3036	 VABSQ_M_S))
3037  ]
3038  "TARGET_HAVE_MVE"
3039  "vpst\;vabst.s%#<V_sz_elem>	%q0, %q2"
3040  [(set_attr "type" "mve_move")
3041   (set_attr "length""8")])
3042
3043;;
3044;; [vaddvaq_p_u, vaddvaq_p_s])
3045;;
3046(define_insn "mve_vaddvaq_p_<supf><mode>"
3047  [
3048   (set (match_operand:SI 0 "s_register_operand" "=Te")
3049	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
3050		       (match_operand:MVE_2 2 "s_register_operand" "w")
3051		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3052	 VADDVAQ_P))
3053  ]
3054  "TARGET_HAVE_MVE"
3055  "vpst\;vaddvat.<supf>%#<V_sz_elem>	%0, %q2"
3056  [(set_attr "type" "mve_move")
3057   (set_attr "length""8")])
3058
3059;;
3060;; [vclsq_m_s])
3061;;
3062(define_insn "mve_vclsq_m_s<mode>"
3063  [
3064   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3065	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3066		       (match_operand:MVE_2 2 "s_register_operand" "w")
3067		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3068	 VCLSQ_M_S))
3069  ]
3070  "TARGET_HAVE_MVE"
3071  "vpst\;vclst.s%#<V_sz_elem>	%q0, %q2"
3072  [(set_attr "type" "mve_move")
3073   (set_attr "length""8")])
3074
3075;;
3076;; [vclzq_m_s, vclzq_m_u])
3077;;
3078(define_insn "mve_vclzq_m_<supf><mode>"
3079  [
3080   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3081	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3082		       (match_operand:MVE_2 2 "s_register_operand" "w")
3083		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3084	 VCLZQ_M))
3085  ]
3086  "TARGET_HAVE_MVE"
3087  "vpst\;vclzt.i%#<V_sz_elem>	%q0, %q2"
3088  [(set_attr "type" "mve_move")
3089   (set_attr "length""8")])
3090
3091;;
3092;; [vcmpcsq_m_n_u])
3093;;
3094(define_insn "mve_vcmpcsq_m_n_u<mode>"
3095  [
3096   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3097	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3098		       (match_operand:<V_elem> 2 "s_register_operand" "r")
3099		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3100	 VCMPCSQ_M_N_U))
3101  ]
3102  "TARGET_HAVE_MVE"
3103  "vpst\;vcmpt.u%#<V_sz_elem>	cs, %q1, %2"
3104  [(set_attr "type" "mve_move")
3105   (set_attr "length""8")])
3106
3107;;
3108;; [vcmpcsq_m_u])
3109;;
3110(define_insn "mve_vcmpcsq_m_u<mode>"
3111  [
3112   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3113	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3114		       (match_operand:MVE_2 2 "s_register_operand" "w")
3115		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3116	 VCMPCSQ_M_U))
3117  ]
3118  "TARGET_HAVE_MVE"
3119  "vpst\;vcmpt.u%#<V_sz_elem>	cs, %q1, %q2"
3120  [(set_attr "type" "mve_move")
3121   (set_attr "length""8")])
3122
3123;;
3124;; [vcmpeqq_m_n_u, vcmpeqq_m_n_s])
3125;;
3126(define_insn "mve_vcmpeqq_m_n_<supf><mode>"
3127  [
3128   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3129	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3130		       (match_operand:<V_elem> 2 "s_register_operand" "r")
3131		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3132	 VCMPEQQ_M_N))
3133  ]
3134  "TARGET_HAVE_MVE"
3135  "vpst\;vcmpt.i%#<V_sz_elem>	eq, %q1, %2"
3136  [(set_attr "type" "mve_move")
3137   (set_attr "length""8")])
3138
3139;;
3140;; [vcmpeqq_m_u, vcmpeqq_m_s])
3141;;
3142(define_insn "mve_vcmpeqq_m_<supf><mode>"
3143  [
3144   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3145	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3146		       (match_operand:MVE_2 2 "s_register_operand" "w")
3147		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3148	 VCMPEQQ_M))
3149  ]
3150  "TARGET_HAVE_MVE"
3151  "vpst\;vcmpt.i%#<V_sz_elem>	eq, %q1, %q2"
3152  [(set_attr "type" "mve_move")
3153   (set_attr "length""8")])
3154
3155;;
3156;; [vcmpgeq_m_n_s])
3157;;
3158(define_insn "mve_vcmpgeq_m_n_s<mode>"
3159  [
3160   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3161	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3162		       (match_operand:<V_elem> 2 "s_register_operand" "r")
3163		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3164	 VCMPGEQ_M_N_S))
3165  ]
3166  "TARGET_HAVE_MVE"
3167  "vpst\;vcmpt.s%#<V_sz_elem>	ge, %q1, %2"
3168  [(set_attr "type" "mve_move")
3169   (set_attr "length""8")])
3170
3171;;
3172;; [vcmpgeq_m_s])
3173;;
3174(define_insn "mve_vcmpgeq_m_s<mode>"
3175  [
3176   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3177	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3178		       (match_operand:MVE_2 2 "s_register_operand" "w")
3179		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3180	 VCMPGEQ_M_S))
3181  ]
3182  "TARGET_HAVE_MVE"
3183  "vpst\;vcmpt.s%#<V_sz_elem>	ge, %q1, %q2"
3184  [(set_attr "type" "mve_move")
3185   (set_attr "length""8")])
3186
3187;;
3188;; [vcmpgtq_m_n_s])
3189;;
3190(define_insn "mve_vcmpgtq_m_n_s<mode>"
3191  [
3192   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3193	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3194		       (match_operand:<V_elem> 2 "s_register_operand" "r")
3195		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3196	 VCMPGTQ_M_N_S))
3197  ]
3198  "TARGET_HAVE_MVE"
3199  "vpst\;vcmpt.s%#<V_sz_elem>	gt, %q1, %2"
3200  [(set_attr "type" "mve_move")
3201   (set_attr "length""8")])
3202
3203;;
3204;; [vcmpgtq_m_s])
3205;;
3206(define_insn "mve_vcmpgtq_m_s<mode>"
3207  [
3208   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3209	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3210		       (match_operand:MVE_2 2 "s_register_operand" "w")
3211		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3212	 VCMPGTQ_M_S))
3213  ]
3214  "TARGET_HAVE_MVE"
3215  "vpst\;vcmpt.s%#<V_sz_elem>	gt, %q1, %q2"
3216  [(set_attr "type" "mve_move")
3217   (set_attr "length""8")])
3218
3219;;
3220;; [vcmphiq_m_n_u])
3221;;
3222(define_insn "mve_vcmphiq_m_n_u<mode>"
3223  [
3224   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3225	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3226		       (match_operand:<V_elem> 2 "s_register_operand" "r")
3227		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3228	 VCMPHIQ_M_N_U))
3229  ]
3230  "TARGET_HAVE_MVE"
3231  "vpst\;vcmpt.u%#<V_sz_elem>	hi, %q1, %2"
3232  [(set_attr "type" "mve_move")
3233   (set_attr "length""8")])
3234
3235;;
3236;; [vcmphiq_m_u])
3237;;
3238(define_insn "mve_vcmphiq_m_u<mode>"
3239  [
3240   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3241	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3242		       (match_operand:MVE_2 2 "s_register_operand" "w")
3243		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3244	 VCMPHIQ_M_U))
3245  ]
3246  "TARGET_HAVE_MVE"
3247  "vpst\;vcmpt.u%#<V_sz_elem>	hi, %q1, %q2"
3248  [(set_attr "type" "mve_move")
3249   (set_attr "length""8")])
3250
3251;;
3252;; [vcmpleq_m_n_s])
3253;;
3254(define_insn "mve_vcmpleq_m_n_s<mode>"
3255  [
3256   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3257	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3258		       (match_operand:<V_elem> 2 "s_register_operand" "r")
3259		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3260	 VCMPLEQ_M_N_S))
3261  ]
3262  "TARGET_HAVE_MVE"
3263  "vpst\;vcmpt.s%#<V_sz_elem>	le, %q1, %2"
3264  [(set_attr "type" "mve_move")
3265   (set_attr "length""8")])
3266
3267;;
3268;; [vcmpleq_m_s])
3269;;
3270(define_insn "mve_vcmpleq_m_s<mode>"
3271  [
3272   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3273	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3274		       (match_operand:MVE_2 2 "s_register_operand" "w")
3275		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3276	 VCMPLEQ_M_S))
3277  ]
3278  "TARGET_HAVE_MVE"
3279  "vpst\;vcmpt.s%#<V_sz_elem>	le, %q1, %q2"
3280  [(set_attr "type" "mve_move")
3281   (set_attr "length""8")])
3282
3283;;
3284;; [vcmpltq_m_n_s])
3285;;
3286(define_insn "mve_vcmpltq_m_n_s<mode>"
3287  [
3288   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3289	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3290		       (match_operand:<V_elem> 2 "s_register_operand" "r")
3291		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3292	 VCMPLTQ_M_N_S))
3293  ]
3294  "TARGET_HAVE_MVE"
3295  "vpst\;vcmpt.s%#<V_sz_elem>	lt, %q1, %2"
3296  [(set_attr "type" "mve_move")
3297   (set_attr "length""8")])
3298
3299;;
3300;; [vcmpltq_m_s])
3301;;
3302(define_insn "mve_vcmpltq_m_s<mode>"
3303  [
3304   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3305	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3306		       (match_operand:MVE_2 2 "s_register_operand" "w")
3307		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3308	 VCMPLTQ_M_S))
3309  ]
3310  "TARGET_HAVE_MVE"
3311  "vpst\;vcmpt.s%#<V_sz_elem>	lt, %q1, %q2"
3312  [(set_attr "type" "mve_move")
3313   (set_attr "length""8")])
3314
3315;;
3316;; [vcmpneq_m_n_u, vcmpneq_m_n_s])
3317;;
3318(define_insn "mve_vcmpneq_m_n_<supf><mode>"
3319  [
3320   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3321	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3322		       (match_operand:<V_elem> 2 "s_register_operand" "r")
3323		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3324	 VCMPNEQ_M_N))
3325  ]
3326  "TARGET_HAVE_MVE"
3327  "vpst\;vcmpt.i%#<V_sz_elem>	ne, %q1, %2"
3328  [(set_attr "type" "mve_move")
3329   (set_attr "length""8")])
3330
3331;;
3332;; [vcmpneq_m_s, vcmpneq_m_u])
3333;;
3334(define_insn "mve_vcmpneq_m_<supf><mode>"
3335  [
3336   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
3337	(unspec:HI [(match_operand:MVE_2 1 "s_register_operand" "w")
3338		       (match_operand:MVE_2 2 "s_register_operand" "w")
3339		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3340	 VCMPNEQ_M))
3341  ]
3342  "TARGET_HAVE_MVE"
3343  "vpst\;vcmpt.i%#<V_sz_elem>	ne, %q1, %q2"
3344  [(set_attr "type" "mve_move")
3345   (set_attr "length""8")])
3346
3347;;
3348;; [vdupq_m_n_s, vdupq_m_n_u])
3349;;
3350(define_insn "mve_vdupq_m_n_<supf><mode>"
3351  [
3352   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3353	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3354		       (match_operand:<V_elem> 2 "s_register_operand" "r")
3355		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3356	 VDUPQ_M_N))
3357  ]
3358  "TARGET_HAVE_MVE"
3359  "vpst\;vdupt.%#<V_sz_elem>	%q0, %2"
3360  [(set_attr "type" "mve_move")
3361   (set_attr "length""8")])
3362
3363;;
3364;; [vmaxaq_m_s])
3365;;
3366(define_insn "mve_vmaxaq_m_s<mode>"
3367  [
3368   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3369	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3370		       (match_operand:MVE_2 2 "s_register_operand" "w")
3371		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3372	 VMAXAQ_M_S))
3373  ]
3374  "TARGET_HAVE_MVE"
3375  "vpst\;vmaxat.s%#<V_sz_elem>	%q0, %q2"
3376  [(set_attr "type" "mve_move")
3377   (set_attr "length""8")])
3378
3379;;
3380;; [vmaxavq_p_s])
3381;;
3382(define_insn "mve_vmaxavq_p_s<mode>"
3383  [
3384   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
3385	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
3386		       (match_operand:MVE_2 2 "s_register_operand" "w")
3387		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3388	 VMAXAVQ_P_S))
3389  ]
3390  "TARGET_HAVE_MVE"
3391  "vpst\;vmaxavt.s%#<V_sz_elem>	%0, %q2"
3392  [(set_attr "type" "mve_move")
3393   (set_attr "length""8")])
3394
3395;;
3396;; [vmaxvq_p_u, vmaxvq_p_s])
3397;;
3398(define_insn "mve_vmaxvq_p_<supf><mode>"
3399  [
3400   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
3401	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
3402		       (match_operand:MVE_2 2 "s_register_operand" "w")
3403		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3404	 VMAXVQ_P))
3405  ]
3406  "TARGET_HAVE_MVE"
3407  "vpst\;vmaxvt.<supf>%#<V_sz_elem>	%0, %q2"
3408  [(set_attr "type" "mve_move")
3409   (set_attr "length""8")])
3410
3411;;
3412;; [vminaq_m_s])
3413;;
3414(define_insn "mve_vminaq_m_s<mode>"
3415  [
3416   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3417	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3418		       (match_operand:MVE_2 2 "s_register_operand" "w")
3419		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3420	 VMINAQ_M_S))
3421  ]
3422  "TARGET_HAVE_MVE"
3423  "vpst\;vminat.s%#<V_sz_elem>	%q0, %q2"
3424  [(set_attr "type" "mve_move")
3425   (set_attr "length""8")])
3426
3427;;
3428;; [vminavq_p_s])
3429;;
3430(define_insn "mve_vminavq_p_s<mode>"
3431  [
3432   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
3433	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
3434		       (match_operand:MVE_2 2 "s_register_operand" "w")
3435		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3436	 VMINAVQ_P_S))
3437  ]
3438  "TARGET_HAVE_MVE"
3439  "vpst\;vminavt.s%#<V_sz_elem>	%0, %q2"
3440  [(set_attr "type" "mve_move")
3441   (set_attr "length""8")])
3442
3443;;
3444;; [vminvq_p_s, vminvq_p_u])
3445;;
3446(define_insn "mve_vminvq_p_<supf><mode>"
3447  [
3448   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
3449	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
3450		       (match_operand:MVE_2 2 "s_register_operand" "w")
3451		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3452	 VMINVQ_P))
3453  ]
3454  "TARGET_HAVE_MVE"
3455  "vpst\;vminvt.<supf>%#<V_sz_elem>\t%0, %q2"
3456  [(set_attr "type" "mve_move")
3457   (set_attr "length""8")])
3458
3459;;
3460;; [vmladavaq_u, vmladavaq_s])
3461;;
3462(define_insn "mve_vmladavaq_<supf><mode>"
3463  [
3464   (set (match_operand:SI 0 "s_register_operand" "=Te")
3465	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
3466		       (match_operand:MVE_2 2 "s_register_operand" "w")
3467		       (match_operand:MVE_2 3 "s_register_operand" "w")]
3468	 VMLADAVAQ))
3469  ]
3470  "TARGET_HAVE_MVE"
3471  "vmladava.<supf>%#<V_sz_elem>	%0, %q2, %q3"
3472  [(set_attr "type" "mve_move")
3473])
3474
3475;;
3476;; [vmladavq_p_u, vmladavq_p_s])
3477;;
3478(define_insn "mve_vmladavq_p_<supf><mode>"
3479  [
3480   (set (match_operand:SI 0 "s_register_operand" "=Te")
3481	(unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
3482		       (match_operand:MVE_2 2 "s_register_operand" "w")
3483		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3484	 VMLADAVQ_P))
3485  ]
3486  "TARGET_HAVE_MVE"
3487  "vpst\;vmladavt.<supf>%#<V_sz_elem>\t%0, %q1, %q2"
3488  [(set_attr "type" "mve_move")
3489   (set_attr "length""8")])
3490
3491;;
3492;; [vmladavxq_p_s])
3493;;
3494(define_insn "mve_vmladavxq_p_s<mode>"
3495  [
3496   (set (match_operand:SI 0 "s_register_operand" "=Te")
3497	(unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
3498		       (match_operand:MVE_2 2 "s_register_operand" "w")
3499		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3500	 VMLADAVXQ_P_S))
3501  ]
3502  "TARGET_HAVE_MVE"
3503  "vpst\;vmladavxt.s%#<V_sz_elem>\t%0, %q1, %q2"
3504  [(set_attr "type" "mve_move")
3505   (set_attr "length""8")])
3506
3507;;
3508;; [vmlaq_n_u, vmlaq_n_s])
3509;;
3510(define_insn "mve_vmlaq_n_<supf><mode>"
3511  [
3512   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3513	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3514		       (match_operand:MVE_2 2 "s_register_operand" "w")
3515		       (match_operand:<V_elem> 3 "s_register_operand" "r")]
3516	 VMLAQ_N))
3517  ]
3518  "TARGET_HAVE_MVE"
3519  "vmla.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
3520  [(set_attr "type" "mve_move")
3521])
3522
3523;;
3524;; [vmlasq_n_u, vmlasq_n_s])
3525;;
3526(define_insn "mve_vmlasq_n_<supf><mode>"
3527  [
3528   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3529	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3530		       (match_operand:MVE_2 2 "s_register_operand" "w")
3531		       (match_operand:<V_elem> 3 "s_register_operand" "r")]
3532	 VMLASQ_N))
3533  ]
3534  "TARGET_HAVE_MVE"
3535  "vmlas.<supf>%#<V_sz_elem>	%q0, %q2, %3"
3536  [(set_attr "type" "mve_move")
3537])
3538
3539;;
3540;; [vmlsdavq_p_s])
3541;;
3542(define_insn "mve_vmlsdavq_p_s<mode>"
3543  [
3544   (set (match_operand:SI 0 "s_register_operand" "=Te")
3545	(unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
3546		       (match_operand:MVE_2 2 "s_register_operand" "w")
3547		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3548	 VMLSDAVQ_P_S))
3549  ]
3550  "TARGET_HAVE_MVE"
3551  "vpst\;vmlsdavt.s%#<V_sz_elem>	%0, %q1, %q2"
3552  [(set_attr "type" "mve_move")
3553   (set_attr "length""8")])
3554
3555;;
3556;; [vmlsdavxq_p_s])
3557;;
3558(define_insn "mve_vmlsdavxq_p_s<mode>"
3559  [
3560   (set (match_operand:SI 0 "s_register_operand" "=Te")
3561	(unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
3562		       (match_operand:MVE_2 2 "s_register_operand" "w")
3563		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3564	 VMLSDAVXQ_P_S))
3565  ]
3566  "TARGET_HAVE_MVE"
3567  "vpst\;vmlsdavxt.s%#<V_sz_elem>	%0, %q1, %q2"
3568  [(set_attr "type" "mve_move")
3569   (set_attr "length""8")])
3570
3571;;
3572;; [vmvnq_m_s, vmvnq_m_u])
3573;;
3574(define_insn "mve_vmvnq_m_<supf><mode>"
3575  [
3576   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3577	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3578		       (match_operand:MVE_2 2 "s_register_operand" "w")
3579		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3580	 VMVNQ_M))
3581  ]
3582  "TARGET_HAVE_MVE"
3583  "vpst\;vmvnt %q0, %q2"
3584  [(set_attr "type" "mve_move")
3585   (set_attr "length""8")])
3586
3587;;
3588;; [vnegq_m_s])
3589;;
3590(define_insn "mve_vnegq_m_s<mode>"
3591  [
3592   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3593	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3594		       (match_operand:MVE_2 2 "s_register_operand" "w")
3595		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3596	 VNEGQ_M_S))
3597  ]
3598  "TARGET_HAVE_MVE"
3599  "vpst\;vnegt.s%#<V_sz_elem>\t%q0, %q2"
3600  [(set_attr "type" "mve_move")
3601   (set_attr "length""8")])
3602
3603;;
3604;; [vpselq_u, vpselq_s])
3605;;
3606(define_insn "mve_vpselq_<supf><mode>"
3607  [
3608   (set (match_operand:MVE_1 0 "s_register_operand" "=w")
3609	(unspec:MVE_1 [(match_operand:MVE_1 1 "s_register_operand" "w")
3610		       (match_operand:MVE_1 2 "s_register_operand" "w")
3611		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3612	 VPSELQ))
3613  ]
3614  "TARGET_HAVE_MVE"
3615  "vpsel %q0, %q1, %q2"
3616  [(set_attr "type" "mve_move")
3617])
3618
3619;;
3620;; [vqabsq_m_s])
3621;;
3622(define_insn "mve_vqabsq_m_s<mode>"
3623  [
3624   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3625	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3626		       (match_operand:MVE_2 2 "s_register_operand" "w")
3627		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3628	 VQABSQ_M_S))
3629  ]
3630  "TARGET_HAVE_MVE"
3631  "vpst\;vqabst.s%#<V_sz_elem>\t%q0, %q2"
3632  [(set_attr "type" "mve_move")
3633   (set_attr "length""8")])
3634
3635;;
3636;; [vqdmlahq_n_s])
3637;;
3638(define_insn "mve_vqdmlahq_n_<supf><mode>"
3639  [
3640   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3641	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3642		       (match_operand:MVE_2 2 "s_register_operand" "w")
3643		       (match_operand:<V_elem> 3 "s_register_operand" "r")]
3644	 VQDMLAHQ_N))
3645  ]
3646  "TARGET_HAVE_MVE"
3647  "vqdmlah.s%#<V_sz_elem>\t%q0, %q2, %3"
3648  [(set_attr "type" "mve_move")
3649])
3650
3651;;
3652;; [vqdmlashq_n_s])
3653;;
3654(define_insn "mve_vqdmlashq_n_<supf><mode>"
3655  [
3656   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3657	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3658		       (match_operand:MVE_2 2 "s_register_operand" "w")
3659		       (match_operand:<V_elem> 3 "s_register_operand" "r")]
3660	 VQDMLASHQ_N))
3661  ]
3662  "TARGET_HAVE_MVE"
3663  "vqdmlash.s%#<V_sz_elem>\t%q0, %q2, %3"
3664  [(set_attr "type" "mve_move")
3665])
3666
3667;;
3668;; [vqnegq_m_s])
3669;;
3670(define_insn "mve_vqnegq_m_s<mode>"
3671  [
3672   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3673	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3674		       (match_operand:MVE_2 2 "s_register_operand" "w")
3675		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3676	 VQNEGQ_M_S))
3677  ]
3678  "TARGET_HAVE_MVE"
3679  "vpst\;vqnegt.s%#<V_sz_elem>	%q0, %q2"
3680  [(set_attr "type" "mve_move")
3681   (set_attr "length""8")])
3682
3683;;
3684;; [vqrdmladhq_s])
3685;;
3686(define_insn "mve_vqrdmladhq_s<mode>"
3687  [
3688   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3689	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3690		       (match_operand:MVE_2 2 "s_register_operand" "w")
3691		       (match_operand:MVE_2 3 "s_register_operand" "w")]
3692	 VQRDMLADHQ_S))
3693  ]
3694  "TARGET_HAVE_MVE"
3695  "vqrdmladh.s%#<V_sz_elem>\t%q0, %q2, %q3"
3696  [(set_attr "type" "mve_move")
3697])
3698
3699;;
3700;; [vqrdmladhxq_s])
3701;;
3702(define_insn "mve_vqrdmladhxq_s<mode>"
3703  [
3704   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3705	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3706		       (match_operand:MVE_2 2 "s_register_operand" "w")
3707		       (match_operand:MVE_2 3 "s_register_operand" "w")]
3708	 VQRDMLADHXQ_S))
3709  ]
3710  "TARGET_HAVE_MVE"
3711  "vqrdmladhx.s%#<V_sz_elem>\t%q0, %q2, %q3"
3712  [(set_attr "type" "mve_move")
3713])
3714
3715;;
3716;; [vqrdmlahq_n_s])
3717;;
3718(define_insn "mve_vqrdmlahq_n_<supf><mode>"
3719  [
3720   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3721	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3722		       (match_operand:MVE_2 2 "s_register_operand" "w")
3723		       (match_operand:<V_elem> 3 "s_register_operand" "r")]
3724	 VQRDMLAHQ_N))
3725  ]
3726  "TARGET_HAVE_MVE"
3727  "vqrdmlah.s%#<V_sz_elem>\t%q0, %q2, %3"
3728  [(set_attr "type" "mve_move")
3729])
3730
3731;;
3732;; [vqrdmlashq_n_s])
3733;;
3734(define_insn "mve_vqrdmlashq_n_<supf><mode>"
3735  [
3736   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3737	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3738		       (match_operand:MVE_2 2 "s_register_operand" "w")
3739		       (match_operand:<V_elem> 3 "s_register_operand" "r")]
3740	 VQRDMLASHQ_N))
3741  ]
3742  "TARGET_HAVE_MVE"
3743  "vqrdmlash.s%#<V_sz_elem>\t%q0, %q2, %3"
3744  [(set_attr "type" "mve_move")
3745])
3746
3747;;
3748;; [vqrdmlsdhq_s])
3749;;
3750(define_insn "mve_vqrdmlsdhq_s<mode>"
3751  [
3752   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3753	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3754		       (match_operand:MVE_2 2 "s_register_operand" "w")
3755		       (match_operand:MVE_2 3 "s_register_operand" "w")]
3756	 VQRDMLSDHQ_S))
3757  ]
3758  "TARGET_HAVE_MVE"
3759  "vqrdmlsdh.s%#<V_sz_elem>\t%q0, %q2, %q3"
3760  [(set_attr "type" "mve_move")
3761])
3762
3763;;
3764;; [vqrdmlsdhxq_s])
3765;;
3766(define_insn "mve_vqrdmlsdhxq_s<mode>"
3767  [
3768   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3769	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3770		       (match_operand:MVE_2 2 "s_register_operand" "w")
3771		       (match_operand:MVE_2 3 "s_register_operand" "w")]
3772	 VQRDMLSDHXQ_S))
3773  ]
3774  "TARGET_HAVE_MVE"
3775  "vqrdmlsdhx.s%#<V_sz_elem>\t%q0, %q2, %q3"
3776  [(set_attr "type" "mve_move")
3777])
3778
3779;;
3780;; [vqrshlq_m_n_s, vqrshlq_m_n_u])
3781;;
3782(define_insn "mve_vqrshlq_m_n_<supf><mode>"
3783  [
3784   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3785	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3786		       (match_operand:SI 2 "s_register_operand" "r")
3787		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3788	 VQRSHLQ_M_N))
3789  ]
3790  "TARGET_HAVE_MVE"
3791  "vpst\;vqrshlt.<supf>%#<V_sz_elem>	%q0, %2"
3792  [(set_attr "type" "mve_move")
3793   (set_attr "length""8")])
3794
3795;;
3796;; [vqshlq_m_r_u, vqshlq_m_r_s])
3797;;
3798(define_insn "mve_vqshlq_m_r_<supf><mode>"
3799  [
3800   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3801	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3802		       (match_operand:SI 2 "s_register_operand" "r")
3803		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3804	 VQSHLQ_M_R))
3805  ]
3806  "TARGET_HAVE_MVE"
3807  "vpst\;vqshlt.<supf>%#<V_sz_elem>\t%q0, %2"
3808  [(set_attr "type" "mve_move")
3809   (set_attr "length""8")])
3810
3811;;
3812;; [vrev64q_m_u, vrev64q_m_s])
3813;;
3814(define_insn "mve_vrev64q_m_<supf><mode>"
3815  [
3816   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3817	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3818		       (match_operand:MVE_2 2 "s_register_operand" "w")
3819		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3820	 VREV64Q_M))
3821  ]
3822  "TARGET_HAVE_MVE"
3823  "vpst\;vrev64t.%#<V_sz_elem>\t%q0, %q2"
3824  [(set_attr "type" "mve_move")
3825   (set_attr "length""8")])
3826
3827;;
3828;; [vrshlq_m_n_s, vrshlq_m_n_u])
3829;;
3830(define_insn "mve_vrshlq_m_n_<supf><mode>"
3831  [
3832   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3833	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3834		       (match_operand:SI 2 "s_register_operand" "r")
3835		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3836	 VRSHLQ_M_N))
3837  ]
3838  "TARGET_HAVE_MVE"
3839  "vpst\;vrshlt.<supf>%#<V_sz_elem>\t%q0, %2"
3840  [(set_attr "type" "mve_move")
3841   (set_attr "length""8")])
3842
3843;;
3844;; [vshlq_m_r_u, vshlq_m_r_s])
3845;;
3846(define_insn "mve_vshlq_m_r_<supf><mode>"
3847  [
3848   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3849	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3850		       (match_operand:SI 2 "s_register_operand" "r")
3851		       (match_operand:HI 3 "vpr_register_operand" "Up")]
3852	 VSHLQ_M_R))
3853  ]
3854  "TARGET_HAVE_MVE"
3855  "vpst\;vshlt.<supf>%#<V_sz_elem>\t%q0, %2"
3856  [(set_attr "type" "mve_move")
3857   (set_attr "length""8")])
3858
3859;;
3860;; [vsliq_n_u, vsliq_n_s])
3861;;
3862(define_insn "mve_vsliq_n_<supf><mode>"
3863  [
3864   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3865	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3866		       (match_operand:MVE_2 2 "s_register_operand" "w")
3867		       (match_operand:SI 3 "<MVE_pred>" "<MVE_constraint>")]
3868	 VSLIQ_N))
3869  ]
3870  "TARGET_HAVE_MVE"
3871  "vsli.%#<V_sz_elem>\t%q0, %q2, %3"
3872  [(set_attr "type" "mve_move")
3873])
3874
3875;;
3876;; [vsriq_n_u, vsriq_n_s])
3877;;
3878(define_insn "mve_vsriq_n_<supf><mode>"
3879  [
3880   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3881	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3882		       (match_operand:MVE_2 2 "s_register_operand" "w")
3883		       (match_operand:SI 3 "mve_imm_selective_upto_8" "Rg")]
3884	 VSRIQ_N))
3885  ]
3886  "TARGET_HAVE_MVE"
3887  "vsri.%#<V_sz_elem>\t%q0, %q2, %3"
3888  [(set_attr "type" "mve_move")
3889])
3890
3891;;
3892;; [vqdmlsdhxq_s])
3893;;
3894(define_insn "mve_vqdmlsdhxq_s<mode>"
3895  [
3896   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3897	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3898		       (match_operand:MVE_2 2 "s_register_operand" "w")
3899		       (match_operand:MVE_2 3 "s_register_operand" "w")]
3900	 VQDMLSDHXQ_S))
3901  ]
3902  "TARGET_HAVE_MVE"
3903  "vqdmlsdhx.s%#<V_sz_elem>\t%q0, %q2, %q3"
3904  [(set_attr "type" "mve_move")
3905])
3906
3907;;
3908;; [vqdmlsdhq_s])
3909;;
3910(define_insn "mve_vqdmlsdhq_s<mode>"
3911  [
3912   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3913	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3914		       (match_operand:MVE_2 2 "s_register_operand" "w")
3915		       (match_operand:MVE_2 3 "s_register_operand" "w")]
3916	 VQDMLSDHQ_S))
3917  ]
3918  "TARGET_HAVE_MVE"
3919  "vqdmlsdh.s%#<V_sz_elem>\t%q0, %q2, %q3"
3920  [(set_attr "type" "mve_move")
3921])
3922
3923;;
3924;; [vqdmladhxq_s])
3925;;
3926(define_insn "mve_vqdmladhxq_s<mode>"
3927  [
3928   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3929	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3930		       (match_operand:MVE_2 2 "s_register_operand" "w")
3931		       (match_operand:MVE_2 3 "s_register_operand" "w")]
3932	 VQDMLADHXQ_S))
3933  ]
3934  "TARGET_HAVE_MVE"
3935  "vqdmladhx.s%#<V_sz_elem>\t%q0, %q2, %q3"
3936  [(set_attr "type" "mve_move")
3937])
3938
3939;;
3940;; [vqdmladhq_s])
3941;;
3942(define_insn "mve_vqdmladhq_s<mode>"
3943  [
3944   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
3945	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
3946		       (match_operand:MVE_2 2 "s_register_operand" "w")
3947		       (match_operand:MVE_2 3 "s_register_operand" "w")]
3948	 VQDMLADHQ_S))
3949  ]
3950  "TARGET_HAVE_MVE"
3951  "vqdmladh.s%#<V_sz_elem>\t%q0, %q2, %q3"
3952  [(set_attr "type" "mve_move")
3953])
3954
3955;;
3956;; [vmlsdavaxq_s])
3957;;
3958(define_insn "mve_vmlsdavaxq_s<mode>"
3959  [
3960   (set (match_operand:SI 0 "s_register_operand" "=Te")
3961	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
3962		    (match_operand:MVE_2 2 "s_register_operand" "w")
3963		    (match_operand:MVE_2 3 "s_register_operand" "w")]
3964	 VMLSDAVAXQ_S))
3965  ]
3966  "TARGET_HAVE_MVE"
3967  "vmlsdavax.s%#<V_sz_elem>\t%0, %q2, %q3"
3968  [(set_attr "type" "mve_move")
3969])
3970
3971;;
3972;; [vmlsdavaq_s])
3973;;
3974(define_insn "mve_vmlsdavaq_s<mode>"
3975  [
3976   (set (match_operand:SI 0 "s_register_operand" "=Te")
3977	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
3978		    (match_operand:MVE_2 2 "s_register_operand" "w")
3979		    (match_operand:MVE_2 3 "s_register_operand" "w")]
3980	 VMLSDAVAQ_S))
3981  ]
3982  "TARGET_HAVE_MVE"
3983  "vmlsdava.s%#<V_sz_elem>\t%0, %q2, %q3"
3984  [(set_attr "type" "mve_move")
3985])
3986
3987;;
3988;; [vmladavaxq_s])
3989;;
3990(define_insn "mve_vmladavaxq_s<mode>"
3991  [
3992   (set (match_operand:SI 0 "s_register_operand" "=Te")
3993	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
3994		    (match_operand:MVE_2 2 "s_register_operand" "w")
3995		    (match_operand:MVE_2 3 "s_register_operand" "w")]
3996	 VMLADAVAXQ_S))
3997  ]
3998  "TARGET_HAVE_MVE"
3999  "vmladavax.s%#<V_sz_elem>\t%0, %q2, %q3"
4000  [(set_attr "type" "mve_move")
4001])
4002;;
4003;; [vabsq_m_f])
4004;;
4005(define_insn "mve_vabsq_m_f<mode>"
4006  [
4007   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4008	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4009		       (match_operand:MVE_0 2 "s_register_operand" "w")
4010		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4011	 VABSQ_M_F))
4012  ]
4013  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4014  "vpst\;vabst.f%#<V_sz_elem>	%q0, %q2"
4015  [(set_attr "type" "mve_move")
4016   (set_attr "length""8")])
4017
4018;;
4019;; [vaddlvaq_p_s vaddlvaq_p_u])
4020;;
4021(define_insn "mve_vaddlvaq_p_<supf>v4si"
4022  [
4023   (set (match_operand:DI 0 "s_register_operand" "=r")
4024	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
4025		       (match_operand:V4SI 2 "s_register_operand" "w")
4026		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4027	 VADDLVAQ_P))
4028  ]
4029  "TARGET_HAVE_MVE"
4030  "vpst\;vaddlvat.<supf>32 %Q0, %R0, %q2"
4031  [(set_attr "type" "mve_move")
4032   (set_attr "length""8")])
4033;;
4034;; [vcmlaq_f])
4035;;
4036(define_insn "mve_vcmlaq_f<mode>"
4037  [
4038   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4039	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4040		       (match_operand:MVE_0 2 "s_register_operand" "w")
4041		       (match_operand:MVE_0 3 "s_register_operand" "w")]
4042	 VCMLAQ_F))
4043  ]
4044  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4045  "vcmla.f%#<V_sz_elem>	%q0, %q2, %q3, #0"
4046  [(set_attr "type" "mve_move")
4047])
4048
4049;;
4050;; [vcmlaq_rot180_f])
4051;;
4052(define_insn "mve_vcmlaq_rot180_f<mode>"
4053  [
4054   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4055	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4056		       (match_operand:MVE_0 2 "s_register_operand" "w")
4057		       (match_operand:MVE_0 3 "s_register_operand" "w")]
4058	 VCMLAQ_ROT180_F))
4059  ]
4060  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4061  "vcmla.f%#<V_sz_elem>	%q0, %q2, %q3, #180"
4062  [(set_attr "type" "mve_move")
4063])
4064
4065;;
4066;; [vcmlaq_rot270_f])
4067;;
4068(define_insn "mve_vcmlaq_rot270_f<mode>"
4069  [
4070   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4071	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4072		       (match_operand:MVE_0 2 "s_register_operand" "w")
4073		       (match_operand:MVE_0 3 "s_register_operand" "w")]
4074	 VCMLAQ_ROT270_F))
4075  ]
4076  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4077  "vcmla.f%#<V_sz_elem>	%q0, %q2, %q3, #270"
4078  [(set_attr "type" "mve_move")
4079])
4080
4081;;
4082;; [vcmlaq_rot90_f])
4083;;
4084(define_insn "mve_vcmlaq_rot90_f<mode>"
4085  [
4086   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4087	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4088		       (match_operand:MVE_0 2 "s_register_operand" "w")
4089		       (match_operand:MVE_0 3 "s_register_operand" "w")]
4090	 VCMLAQ_ROT90_F))
4091  ]
4092  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4093  "vcmla.f%#<V_sz_elem>	%q0, %q2, %q3, #90"
4094  [(set_attr "type" "mve_move")
4095])
4096
4097;;
4098;; [vcmpeqq_m_n_f])
4099;;
4100(define_insn "mve_vcmpeqq_m_n_f<mode>"
4101  [
4102   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4103	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4104		       (match_operand:<V_elem> 2 "s_register_operand" "r")
4105		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4106	 VCMPEQQ_M_N_F))
4107  ]
4108  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4109  "vpst\;vcmpt.f%#<V_sz_elem>	eq, %q1, %2"
4110  [(set_attr "type" "mve_move")
4111   (set_attr "length""8")])
4112
4113;;
4114;; [vcmpgeq_m_f])
4115;;
4116(define_insn "mve_vcmpgeq_m_f<mode>"
4117  [
4118   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4119	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4120		       (match_operand:MVE_0 2 "s_register_operand" "w")
4121		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4122	 VCMPGEQ_M_F))
4123  ]
4124  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4125  "vpst\;vcmpt.f%#<V_sz_elem>	ge, %q1, %q2"
4126  [(set_attr "type" "mve_move")
4127   (set_attr "length""8")])
4128
4129;;
4130;; [vcmpgeq_m_n_f])
4131;;
4132(define_insn "mve_vcmpgeq_m_n_f<mode>"
4133  [
4134   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4135	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4136		       (match_operand:<V_elem> 2 "s_register_operand" "r")
4137		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4138	 VCMPGEQ_M_N_F))
4139  ]
4140  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4141  "vpst\;vcmpt.f%#<V_sz_elem>	ge, %q1, %2"
4142  [(set_attr "type" "mve_move")
4143   (set_attr "length""8")])
4144
4145;;
4146;; [vcmpgtq_m_f])
4147;;
4148(define_insn "mve_vcmpgtq_m_f<mode>"
4149  [
4150   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4151	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4152		       (match_operand:MVE_0 2 "s_register_operand" "w")
4153		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4154	 VCMPGTQ_M_F))
4155  ]
4156  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4157  "vpst\;vcmpt.f%#<V_sz_elem>	gt, %q1, %q2"
4158  [(set_attr "type" "mve_move")
4159   (set_attr "length""8")])
4160
4161;;
4162;; [vcmpgtq_m_n_f])
4163;;
4164(define_insn "mve_vcmpgtq_m_n_f<mode>"
4165  [
4166   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4167	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4168		       (match_operand:<V_elem> 2 "s_register_operand" "r")
4169		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4170	 VCMPGTQ_M_N_F))
4171  ]
4172  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4173  "vpst\;vcmpt.f%#<V_sz_elem>	gt, %q1, %2"
4174  [(set_attr "type" "mve_move")
4175   (set_attr "length""8")])
4176
4177;;
4178;; [vcmpleq_m_f])
4179;;
4180(define_insn "mve_vcmpleq_m_f<mode>"
4181  [
4182   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4183	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4184		       (match_operand:MVE_0 2 "s_register_operand" "w")
4185		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4186	 VCMPLEQ_M_F))
4187  ]
4188  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4189  "vpst\;vcmpt.f%#<V_sz_elem>	le, %q1, %q2"
4190  [(set_attr "type" "mve_move")
4191   (set_attr "length""8")])
4192
4193;;
4194;; [vcmpleq_m_n_f])
4195;;
4196(define_insn "mve_vcmpleq_m_n_f<mode>"
4197  [
4198   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4199	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4200		       (match_operand:<V_elem> 2 "s_register_operand" "r")
4201		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4202	 VCMPLEQ_M_N_F))
4203  ]
4204  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4205  "vpst\;vcmpt.f%#<V_sz_elem>	le, %q1, %2"
4206  [(set_attr "type" "mve_move")
4207   (set_attr "length""8")])
4208
4209;;
4210;; [vcmpltq_m_f])
4211;;
4212(define_insn "mve_vcmpltq_m_f<mode>"
4213  [
4214   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4215	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4216		       (match_operand:MVE_0 2 "s_register_operand" "w")
4217		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4218	 VCMPLTQ_M_F))
4219  ]
4220  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4221  "vpst\;vcmpt.f%#<V_sz_elem>	lt, %q1, %q2"
4222  [(set_attr "type" "mve_move")
4223   (set_attr "length""8")])
4224
4225;;
4226;; [vcmpltq_m_n_f])
4227;;
4228(define_insn "mve_vcmpltq_m_n_f<mode>"
4229  [
4230   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4231	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4232		       (match_operand:<V_elem> 2 "s_register_operand" "r")
4233		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4234	 VCMPLTQ_M_N_F))
4235  ]
4236  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4237  "vpst\;vcmpt.f%#<V_sz_elem>	lt, %q1, %2"
4238  [(set_attr "type" "mve_move")
4239   (set_attr "length""8")])
4240
4241;;
4242;; [vcmpneq_m_f])
4243;;
4244(define_insn "mve_vcmpneq_m_f<mode>"
4245  [
4246   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4247	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4248		       (match_operand:MVE_0 2 "s_register_operand" "w")
4249		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4250	 VCMPNEQ_M_F))
4251  ]
4252  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4253  "vpst\;vcmpt.f%#<V_sz_elem>	ne, %q1, %q2"
4254  [(set_attr "type" "mve_move")
4255   (set_attr "length""8")])
4256
4257;;
4258;; [vcmpneq_m_n_f])
4259;;
4260(define_insn "mve_vcmpneq_m_n_f<mode>"
4261  [
4262   (set (match_operand:HI 0 "vpr_register_operand" "=Up")
4263	(unspec:HI [(match_operand:MVE_0 1 "s_register_operand" "w")
4264		       (match_operand:<V_elem> 2 "s_register_operand" "r")
4265		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4266	 VCMPNEQ_M_N_F))
4267  ]
4268  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4269  "vpst\;vcmpt.f%#<V_sz_elem>	ne, %q1, %2"
4270  [(set_attr "type" "mve_move")
4271   (set_attr "length""8")])
4272
4273;;
4274;; [vcvtbq_m_f16_f32])
4275;;
4276(define_insn "mve_vcvtbq_m_f16_f32v8hf"
4277  [
4278   (set (match_operand:V8HF 0 "s_register_operand" "=w")
4279	(unspec:V8HF [(match_operand:V8HF 1 "s_register_operand" "0")
4280		       (match_operand:V4SF 2 "s_register_operand" "w")
4281		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4282	 VCVTBQ_M_F16_F32))
4283  ]
4284  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4285  "vpst\;vcvtbt.f16.f32 %q0, %q2"
4286  [(set_attr "type" "mve_move")
4287   (set_attr "length""8")])
4288
4289;;
4290;; [vcvtbq_m_f32_f16])
4291;;
4292(define_insn "mve_vcvtbq_m_f32_f16v4sf"
4293  [
4294   (set (match_operand:V4SF 0 "s_register_operand" "=w")
4295	(unspec:V4SF [(match_operand:V4SF 1 "s_register_operand" "0")
4296		       (match_operand:V8HF 2 "s_register_operand" "w")
4297		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4298	 VCVTBQ_M_F32_F16))
4299  ]
4300  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4301  "vpst\;vcvtbt.f32.f16 %q0, %q2"
4302  [(set_attr "type" "mve_move")
4303   (set_attr "length""8")])
4304
4305;;
4306;; [vcvttq_m_f16_f32])
4307;;
4308(define_insn "mve_vcvttq_m_f16_f32v8hf"
4309  [
4310   (set (match_operand:V8HF 0 "s_register_operand" "=w")
4311	(unspec:V8HF [(match_operand:V8HF 1 "s_register_operand" "0")
4312		       (match_operand:V4SF 2 "s_register_operand" "w")
4313		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4314	 VCVTTQ_M_F16_F32))
4315  ]
4316  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4317  "vpst\;vcvttt.f16.f32 %q0, %q2"
4318  [(set_attr "type" "mve_move")
4319   (set_attr "length""8")])
4320
4321;;
4322;; [vcvttq_m_f32_f16])
4323;;
4324(define_insn "mve_vcvttq_m_f32_f16v4sf"
4325  [
4326   (set (match_operand:V4SF 0 "s_register_operand" "=w")
4327	(unspec:V4SF [(match_operand:V4SF 1 "s_register_operand" "0")
4328		       (match_operand:V8HF 2 "s_register_operand" "w")
4329		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4330	 VCVTTQ_M_F32_F16))
4331  ]
4332  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4333  "vpst\;vcvttt.f32.f16 %q0, %q2"
4334  [(set_attr "type" "mve_move")
4335   (set_attr "length""8")])
4336
4337;;
4338;; [vdupq_m_n_f])
4339;;
4340(define_insn "mve_vdupq_m_n_f<mode>"
4341  [
4342   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4343	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4344		       (match_operand:<V_elem> 2 "s_register_operand" "r")
4345		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4346	 VDUPQ_M_N_F))
4347  ]
4348  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4349  "vpst\;vdupt.%#<V_sz_elem>	%q0, %2"
4350  [(set_attr "type" "mve_move")
4351   (set_attr "length""8")])
4352
4353;;
4354;; [vfmaq_f])
4355;;
4356(define_insn "mve_vfmaq_f<mode>"
4357  [
4358   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4359	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4360		       (match_operand:MVE_0 2 "s_register_operand" "w")
4361		       (match_operand:MVE_0 3 "s_register_operand" "w")]
4362	 VFMAQ_F))
4363  ]
4364  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4365  "vfma.f%#<V_sz_elem>	%q0, %q2, %q3"
4366  [(set_attr "type" "mve_move")
4367])
4368
4369;;
4370;; [vfmaq_n_f])
4371;;
4372(define_insn "mve_vfmaq_n_f<mode>"
4373  [
4374   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4375	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4376		       (match_operand:MVE_0 2 "s_register_operand" "w")
4377		       (match_operand:<V_elem> 3 "s_register_operand" "r")]
4378	 VFMAQ_N_F))
4379  ]
4380  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4381  "vfma.f%#<V_sz_elem>	%q0, %q2, %3"
4382  [(set_attr "type" "mve_move")
4383])
4384
4385;;
4386;; [vfmasq_n_f])
4387;;
4388(define_insn "mve_vfmasq_n_f<mode>"
4389  [
4390   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4391	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4392		       (match_operand:MVE_0 2 "s_register_operand" "w")
4393		       (match_operand:<V_elem> 3 "s_register_operand" "r")]
4394	 VFMASQ_N_F))
4395  ]
4396  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4397  "vfmas.f%#<V_sz_elem>	%q0, %q2, %3"
4398  [(set_attr "type" "mve_move")
4399])
4400;;
4401;; [vfmsq_f])
4402;;
4403(define_insn "mve_vfmsq_f<mode>"
4404  [
4405   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4406	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4407		       (match_operand:MVE_0 2 "s_register_operand" "w")
4408		       (match_operand:MVE_0 3 "s_register_operand" "w")]
4409	 VFMSQ_F))
4410  ]
4411  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4412  "vfms.f%#<V_sz_elem>	%q0, %q2, %q3"
4413  [(set_attr "type" "mve_move")
4414])
4415
4416;;
4417;; [vmaxnmaq_m_f])
4418;;
4419(define_insn "mve_vmaxnmaq_m_f<mode>"
4420  [
4421   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4422	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4423		       (match_operand:MVE_0 2 "s_register_operand" "w")
4424		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4425	 VMAXNMAQ_M_F))
4426  ]
4427  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4428  "vpst\;vmaxnmat.f%#<V_sz_elem>	%q0, %q2"
4429  [(set_attr "type" "mve_move")
4430   (set_attr "length""8")])
4431;;
4432;; [vmaxnmavq_p_f])
4433;;
4434(define_insn "mve_vmaxnmavq_p_f<mode>"
4435  [
4436   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
4437	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
4438		       (match_operand:MVE_0 2 "s_register_operand" "w")
4439		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4440	 VMAXNMAVQ_P_F))
4441  ]
4442  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4443  "vpst\;vmaxnmavt.f%#<V_sz_elem>	%0, %q2"
4444  [(set_attr "type" "mve_move")
4445   (set_attr "length""8")])
4446
4447;;
4448;; [vmaxnmvq_p_f])
4449;;
4450(define_insn "mve_vmaxnmvq_p_f<mode>"
4451  [
4452   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
4453	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
4454		       (match_operand:MVE_0 2 "s_register_operand" "w")
4455		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4456	 VMAXNMVQ_P_F))
4457  ]
4458  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4459  "vpst\;vmaxnmvt.f%#<V_sz_elem>	%0, %q2"
4460  [(set_attr "type" "mve_move")
4461   (set_attr "length""8")])
4462;;
4463;; [vminnmaq_m_f])
4464;;
4465(define_insn "mve_vminnmaq_m_f<mode>"
4466  [
4467   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4468	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4469		       (match_operand:MVE_0 2 "s_register_operand" "w")
4470		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4471	 VMINNMAQ_M_F))
4472  ]
4473  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4474  "vpst\;vminnmat.f%#<V_sz_elem>	%q0, %q2"
4475  [(set_attr "type" "mve_move")
4476   (set_attr "length""8")])
4477
4478;;
4479;; [vminnmavq_p_f])
4480;;
4481(define_insn "mve_vminnmavq_p_f<mode>"
4482  [
4483   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
4484	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
4485		       (match_operand:MVE_0 2 "s_register_operand" "w")
4486		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4487	 VMINNMAVQ_P_F))
4488  ]
4489  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4490  "vpst\;vminnmavt.f%#<V_sz_elem>	%0, %q2"
4491  [(set_attr "type" "mve_move")
4492   (set_attr "length""8")])
4493;;
4494;; [vminnmvq_p_f])
4495;;
4496(define_insn "mve_vminnmvq_p_f<mode>"
4497  [
4498   (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
4499	(unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
4500		       (match_operand:MVE_0 2 "s_register_operand" "w")
4501		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4502	 VMINNMVQ_P_F))
4503  ]
4504  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4505  "vpst\;vminnmvt.f%#<V_sz_elem>	%0, %q2"
4506  [(set_attr "type" "mve_move")
4507   (set_attr "length""8")])
4508
4509;;
4510;; [vmlaldavaq_s, vmlaldavaq_u])
4511;;
4512(define_insn "mve_vmlaldavaq_<supf><mode>"
4513  [
4514   (set (match_operand:DI 0 "s_register_operand" "=r")
4515	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
4516		       (match_operand:MVE_5 2 "s_register_operand" "w")
4517		       (match_operand:MVE_5 3 "s_register_operand" "w")]
4518	 VMLALDAVAQ))
4519  ]
4520  "TARGET_HAVE_MVE"
4521  "vmlaldava.<supf>%#<V_sz_elem> %Q0, %R0, %q2, %q3"
4522  [(set_attr "type" "mve_move")
4523])
4524
4525;;
4526;; [vmlaldavaxq_s])
4527;;
4528(define_insn "mve_vmlaldavaxq_s<mode>"
4529  [
4530   (set (match_operand:DI 0 "s_register_operand" "=r")
4531	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
4532		       (match_operand:MVE_5 2 "s_register_operand" "w")
4533		       (match_operand:MVE_5 3 "s_register_operand" "w")]
4534	 VMLALDAVAXQ_S))
4535  ]
4536  "TARGET_HAVE_MVE"
4537  "vmlaldavax.s%#<V_sz_elem> %Q0, %R0, %q2, %q3"
4538  [(set_attr "type" "mve_move")
4539])
4540
4541;;
4542;; [vmlaldavq_p_u, vmlaldavq_p_s])
4543;;
4544(define_insn "mve_vmlaldavq_p_<supf><mode>"
4545  [
4546   (set (match_operand:DI 0 "s_register_operand" "=r")
4547	(unspec:DI [(match_operand:MVE_5 1 "s_register_operand" "w")
4548		       (match_operand:MVE_5 2 "s_register_operand" "w")
4549		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4550	 VMLALDAVQ_P))
4551  ]
4552  "TARGET_HAVE_MVE"
4553  "vpst\;vmlaldavt.<supf>%#<V_sz_elem> %Q0, %R0, %q1, %q2"
4554  [(set_attr "type" "mve_move")
4555   (set_attr "length""8")])
4556
4557;;
4558;; [vmlaldavxq_p_s])
4559;;
4560(define_insn "mve_vmlaldavxq_p_s<mode>"
4561  [
4562   (set (match_operand:DI 0 "s_register_operand" "=r")
4563	(unspec:DI [(match_operand:MVE_5 1 "s_register_operand" "w")
4564		       (match_operand:MVE_5 2 "s_register_operand" "w")
4565		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4566	 VMLALDAVXQ_P_S))
4567  ]
4568  "TARGET_HAVE_MVE"
4569  "vpst\;vmlaldavxt.s%#<V_sz_elem>\t%Q0, %R0, %q1, %q2"
4570  [(set_attr "type" "mve_move")
4571   (set_attr "length""8")])
4572;;
4573;; [vmlsldavaq_s])
4574;;
4575(define_insn "mve_vmlsldavaq_s<mode>"
4576  [
4577   (set (match_operand:DI 0 "s_register_operand" "=r")
4578	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
4579		       (match_operand:MVE_5 2 "s_register_operand" "w")
4580		       (match_operand:MVE_5 3 "s_register_operand" "w")]
4581	 VMLSLDAVAQ_S))
4582  ]
4583  "TARGET_HAVE_MVE"
4584  "vmlsldava.s%#<V_sz_elem> %Q0, %R0, %q2, %q3"
4585  [(set_attr "type" "mve_move")
4586])
4587
4588;;
4589;; [vmlsldavaxq_s])
4590;;
4591(define_insn "mve_vmlsldavaxq_s<mode>"
4592  [
4593   (set (match_operand:DI 0 "s_register_operand" "=r")
4594	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
4595		       (match_operand:MVE_5 2 "s_register_operand" "w")
4596		       (match_operand:MVE_5 3 "s_register_operand" "w")]
4597	 VMLSLDAVAXQ_S))
4598  ]
4599  "TARGET_HAVE_MVE"
4600  "vmlsldavax.s%#<V_sz_elem> %Q0, %R0, %q2, %q3"
4601  [(set_attr "type" "mve_move")
4602])
4603
4604;;
4605;; [vmlsldavq_p_s])
4606;;
4607(define_insn "mve_vmlsldavq_p_s<mode>"
4608  [
4609   (set (match_operand:DI 0 "s_register_operand" "=r")
4610	(unspec:DI [(match_operand:MVE_5 1 "s_register_operand" "w")
4611		       (match_operand:MVE_5 2 "s_register_operand" "w")
4612		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4613	 VMLSLDAVQ_P_S))
4614  ]
4615  "TARGET_HAVE_MVE"
4616  "vpst\;vmlsldavt.s%#<V_sz_elem> %Q0, %R0, %q1, %q2"
4617  [(set_attr "type" "mve_move")
4618   (set_attr "length""8")])
4619
4620;;
4621;; [vmlsldavxq_p_s])
4622;;
4623(define_insn "mve_vmlsldavxq_p_s<mode>"
4624  [
4625   (set (match_operand:DI 0 "s_register_operand" "=r")
4626	(unspec:DI [(match_operand:MVE_5 1 "s_register_operand" "w")
4627		       (match_operand:MVE_5 2 "s_register_operand" "w")
4628		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4629	 VMLSLDAVXQ_P_S))
4630  ]
4631  "TARGET_HAVE_MVE"
4632  "vpst\;vmlsldavxt.s%#<V_sz_elem> %Q0, %R0, %q1, %q2"
4633  [(set_attr "type" "mve_move")
4634   (set_attr "length""8")])
4635;;
4636;; [vmovlbq_m_u, vmovlbq_m_s])
4637;;
4638(define_insn "mve_vmovlbq_m_<supf><mode>"
4639  [
4640   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
4641	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
4642		       (match_operand:MVE_3 2 "s_register_operand" "w")
4643		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4644	 VMOVLBQ_M))
4645  ]
4646  "TARGET_HAVE_MVE"
4647  "vpst\;vmovlbt.<supf>%#<V_sz_elem>	%q0, %q2"
4648  [(set_attr "type" "mve_move")
4649   (set_attr "length""8")])
4650;;
4651;; [vmovltq_m_u, vmovltq_m_s])
4652;;
4653(define_insn "mve_vmovltq_m_<supf><mode>"
4654  [
4655   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
4656	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
4657		       (match_operand:MVE_3 2 "s_register_operand" "w")
4658		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4659	 VMOVLTQ_M))
4660  ]
4661  "TARGET_HAVE_MVE"
4662  "vpst\;vmovltt.<supf>%#<V_sz_elem>	%q0, %q2"
4663  [(set_attr "type" "mve_move")
4664   (set_attr "length""8")])
4665;;
4666;; [vmovnbq_m_u, vmovnbq_m_s])
4667;;
4668(define_insn "mve_vmovnbq_m_<supf><mode>"
4669  [
4670   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4671	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4672		       (match_operand:MVE_5 2 "s_register_operand" "w")
4673		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4674	 VMOVNBQ_M))
4675  ]
4676  "TARGET_HAVE_MVE"
4677  "vpst\;vmovnbt.i%#<V_sz_elem>	%q0, %q2"
4678  [(set_attr "type" "mve_move")
4679   (set_attr "length""8")])
4680
4681;;
4682;; [vmovntq_m_u, vmovntq_m_s])
4683;;
4684(define_insn "mve_vmovntq_m_<supf><mode>"
4685  [
4686   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4687	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4688		       (match_operand:MVE_5 2 "s_register_operand" "w")
4689		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4690	 VMOVNTQ_M))
4691  ]
4692  "TARGET_HAVE_MVE"
4693  "vpst\;vmovntt.i%#<V_sz_elem>	%q0, %q2"
4694  [(set_attr "type" "mve_move")
4695   (set_attr "length""8")])
4696
4697;;
4698;; [vmvnq_m_n_u, vmvnq_m_n_s])
4699;;
4700(define_insn "mve_vmvnq_m_n_<supf><mode>"
4701  [
4702   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
4703	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
4704		       (match_operand:SI 2 "immediate_operand" "i")
4705		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4706	 VMVNQ_M_N))
4707  ]
4708  "TARGET_HAVE_MVE"
4709  "vpst\;vmvnt.i%#<V_sz_elem>	%q0, %2"
4710  [(set_attr "type" "mve_move")
4711   (set_attr "length""8")])
4712;;
4713;; [vnegq_m_f])
4714;;
4715(define_insn "mve_vnegq_m_f<mode>"
4716  [
4717   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4718	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4719		       (match_operand:MVE_0 2 "s_register_operand" "w")
4720		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4721	 VNEGQ_M_F))
4722  ]
4723  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4724  "vpst\;vnegt.f%#<V_sz_elem>	%q0, %q2"
4725  [(set_attr "type" "mve_move")
4726   (set_attr "length""8")])
4727
4728;;
4729;; [vorrq_m_n_s, vorrq_m_n_u])
4730;;
4731(define_insn "mve_vorrq_m_n_<supf><mode>"
4732  [
4733   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
4734	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
4735		       (match_operand:SI 2 "immediate_operand" "i")
4736		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4737	 VORRQ_M_N))
4738  ]
4739  "TARGET_HAVE_MVE"
4740  "vpst\;vorrt.i%#<V_sz_elem>	%q0, %2"
4741  [(set_attr "type" "mve_move")
4742   (set_attr "length""8")])
4743;;
4744;; [vpselq_f])
4745;;
4746(define_insn "mve_vpselq_f<mode>"
4747  [
4748   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4749	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
4750		       (match_operand:MVE_0 2 "s_register_operand" "w")
4751		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4752	 VPSELQ_F))
4753  ]
4754  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4755  "vpsel %q0, %q1, %q2"
4756  [(set_attr "type" "mve_move")
4757])
4758
4759;;
4760;; [vqmovnbq_m_s, vqmovnbq_m_u])
4761;;
4762(define_insn "mve_vqmovnbq_m_<supf><mode>"
4763  [
4764   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4765	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4766		       (match_operand:MVE_5 2 "s_register_operand" "w")
4767		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4768	 VQMOVNBQ_M))
4769  ]
4770  "TARGET_HAVE_MVE"
4771  "vpst\;vqmovnbt.<supf>%#<V_sz_elem>	%q0, %q2"
4772  [(set_attr "type" "mve_move")
4773   (set_attr "length""8")])
4774
4775;;
4776;; [vqmovntq_m_u, vqmovntq_m_s])
4777;;
4778(define_insn "mve_vqmovntq_m_<supf><mode>"
4779  [
4780   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4781	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4782		       (match_operand:MVE_5 2 "s_register_operand" "w")
4783		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4784	 VQMOVNTQ_M))
4785  ]
4786  "TARGET_HAVE_MVE"
4787  "vpst\;vqmovntt.<supf>%#<V_sz_elem>	%q0, %q2"
4788  [(set_attr "type" "mve_move")
4789   (set_attr "length""8")])
4790
4791;;
4792;; [vqmovunbq_m_s])
4793;;
4794(define_insn "mve_vqmovunbq_m_s<mode>"
4795  [
4796   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4797	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4798		       (match_operand:MVE_5 2 "s_register_operand" "w")
4799		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4800	 VQMOVUNBQ_M_S))
4801  ]
4802  "TARGET_HAVE_MVE"
4803  "vpst\;vqmovunbt.s%#<V_sz_elem>	%q0, %q2"
4804  [(set_attr "type" "mve_move")
4805   (set_attr "length""8")])
4806
4807;;
4808;; [vqmovuntq_m_s])
4809;;
4810(define_insn "mve_vqmovuntq_m_s<mode>"
4811  [
4812   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4813	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4814		       (match_operand:MVE_5 2 "s_register_operand" "w")
4815		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4816	 VQMOVUNTQ_M_S))
4817  ]
4818  "TARGET_HAVE_MVE"
4819  "vpst\;vqmovuntt.s%#<V_sz_elem>	%q0, %q2"
4820  [(set_attr "type" "mve_move")
4821   (set_attr "length""8")])
4822
4823;;
4824;; [vqrshrntq_n_u, vqrshrntq_n_s])
4825;;
4826(define_insn "mve_vqrshrntq_n_<supf><mode>"
4827  [
4828   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4829	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4830		       (match_operand:MVE_5 2 "s_register_operand" "w")
4831		       (match_operand:SI 3 "mve_imm_8" "Rb")]
4832	 VQRSHRNTQ_N))
4833  ]
4834  "TARGET_HAVE_MVE"
4835  "vqrshrnt.<supf>%#<V_sz_elem>	%q0, %q2, %3"
4836  [(set_attr "type" "mve_move")
4837])
4838
4839;;
4840;; [vqrshruntq_n_s])
4841;;
4842(define_insn "mve_vqrshruntq_n_s<mode>"
4843  [
4844   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4845	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4846		       (match_operand:MVE_5 2 "s_register_operand" "w")
4847		       (match_operand:SI 3 "mve_imm_8" "Rb")]
4848	 VQRSHRUNTQ_N_S))
4849  ]
4850  "TARGET_HAVE_MVE"
4851  "vqrshrunt.s%#<V_sz_elem>	%q0, %q2, %3"
4852  [(set_attr "type" "mve_move")
4853])
4854
4855;;
4856;; [vqshrnbq_n_u, vqshrnbq_n_s])
4857;;
4858(define_insn "mve_vqshrnbq_n_<supf><mode>"
4859  [
4860   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4861	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4862		       (match_operand:MVE_5 2 "s_register_operand" "w")
4863		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")]
4864	 VQSHRNBQ_N))
4865  ]
4866  "TARGET_HAVE_MVE"
4867  "vqshrnb.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
4868  [(set_attr "type" "mve_move")
4869])
4870
4871;;
4872;; [vqshrntq_n_u, vqshrntq_n_s])
4873;;
4874(define_insn "mve_vqshrntq_n_<supf><mode>"
4875  [
4876   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4877	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4878		       (match_operand:MVE_5 2 "s_register_operand" "w")
4879		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")]
4880	 VQSHRNTQ_N))
4881  ]
4882  "TARGET_HAVE_MVE"
4883  "vqshrnt.<supf>%#<V_sz_elem>	%q0, %q2, %3"
4884  [(set_attr "type" "mve_move")
4885])
4886
4887;;
4888;; [vqshrunbq_n_s])
4889;;
4890(define_insn "mve_vqshrunbq_n_s<mode>"
4891  [
4892   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4893	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4894		       (match_operand:MVE_5 2 "s_register_operand" "w")
4895		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")]
4896	 VQSHRUNBQ_N_S))
4897  ]
4898  "TARGET_HAVE_MVE"
4899  "vqshrunb.s%#<V_sz_elem>	%q0, %q2, %3"
4900  [(set_attr "type" "mve_move")
4901])
4902
4903;;
4904;; [vqshruntq_n_s])
4905;;
4906(define_insn "mve_vqshruntq_n_s<mode>"
4907  [
4908   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
4909	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
4910		       (match_operand:MVE_5 2 "s_register_operand" "w")
4911		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")]
4912	 VQSHRUNTQ_N_S))
4913  ]
4914  "TARGET_HAVE_MVE"
4915  "vqshrunt.s%#<V_sz_elem>	%q0, %q2, %3"
4916  [(set_attr "type" "mve_move")
4917])
4918
4919;;
4920;; [vrev32q_m_f])
4921;;
4922(define_insn "mve_vrev32q_m_fv8hf"
4923  [
4924   (set (match_operand:V8HF 0 "s_register_operand" "=w")
4925	(unspec:V8HF [(match_operand:V8HF 1 "s_register_operand" "0")
4926		       (match_operand:V8HF 2 "s_register_operand" "w")
4927		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4928	 VREV32Q_M_F))
4929  ]
4930  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4931  "vpst\;vrev32t.16 %q0, %q2"
4932  [(set_attr "type" "mve_move")
4933   (set_attr "length""8")])
4934
4935;;
4936;; [vrev32q_m_s, vrev32q_m_u])
4937;;
4938(define_insn "mve_vrev32q_m_<supf><mode>"
4939  [
4940   (set (match_operand:MVE_3 0 "s_register_operand" "=w")
4941	(unspec:MVE_3 [(match_operand:MVE_3 1 "s_register_operand" "0")
4942		       (match_operand:MVE_3 2 "s_register_operand" "w")
4943		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4944	 VREV32Q_M))
4945  ]
4946  "TARGET_HAVE_MVE"
4947  "vpst\;vrev32t.%#<V_sz_elem>	%q0, %q2"
4948  [(set_attr "type" "mve_move")
4949   (set_attr "length""8")])
4950
4951;;
4952;; [vrev64q_m_f])
4953;;
4954(define_insn "mve_vrev64q_m_f<mode>"
4955  [
4956   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
4957	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
4958		       (match_operand:MVE_0 2 "s_register_operand" "w")
4959		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4960	 VREV64Q_M_F))
4961  ]
4962  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4963  "vpst\;vrev64t.%#<V_sz_elem>	%q0, %q2"
4964  [(set_attr "type" "mve_move")
4965   (set_attr "length""8")])
4966
4967;;
4968;; [vrmlaldavhaxq_s])
4969;;
4970(define_insn "mve_vrmlaldavhaxq_sv4si"
4971  [
4972   (set (match_operand:DI 0 "s_register_operand" "=r")
4973	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
4974		       (match_operand:V4SI 2 "s_register_operand" "w")
4975		       (match_operand:V4SI 3 "s_register_operand" "w")]
4976	 VRMLALDAVHAXQ_S))
4977  ]
4978  "TARGET_HAVE_MVE"
4979  "vrmlaldavhax.s32 %Q0, %R0, %q2, %q3"
4980  [(set_attr "type" "mve_move")
4981])
4982
4983;;
4984;; [vrmlaldavhxq_p_s])
4985;;
4986(define_insn "mve_vrmlaldavhxq_p_sv4si"
4987  [
4988   (set (match_operand:DI 0 "s_register_operand" "=r")
4989	(unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
4990		       (match_operand:V4SI 2 "s_register_operand" "w")
4991		       (match_operand:HI 3 "vpr_register_operand" "Up")]
4992	 VRMLALDAVHXQ_P_S))
4993  ]
4994  "TARGET_HAVE_MVE"
4995  "vpst\;vrmlaldavhxt.s32 %Q0, %R0, %q1, %q2"
4996  [(set_attr "type" "mve_move")
4997   (set_attr "length""8")])
4998
4999;;
5000;; [vrmlsldavhaxq_s])
5001;;
5002(define_insn "mve_vrmlsldavhaxq_sv4si"
5003  [
5004   (set (match_operand:DI 0 "s_register_operand" "=r")
5005	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
5006		       (match_operand:V4SI 2 "s_register_operand" "w")
5007		       (match_operand:V4SI 3 "s_register_operand" "w")]
5008	 VRMLSLDAVHAXQ_S))
5009  ]
5010  "TARGET_HAVE_MVE"
5011  "vrmlsldavhax.s32 %Q0, %R0, %q2, %q3"
5012  [(set_attr "type" "mve_move")
5013])
5014
5015;;
5016;; [vrmlsldavhq_p_s])
5017;;
5018(define_insn "mve_vrmlsldavhq_p_sv4si"
5019  [
5020   (set (match_operand:DI 0 "s_register_operand" "=r")
5021	(unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
5022		       (match_operand:V4SI 2 "s_register_operand" "w")
5023		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5024	 VRMLSLDAVHQ_P_S))
5025  ]
5026  "TARGET_HAVE_MVE"
5027  "vpst\;vrmlsldavht.s32 %Q0, %R0, %q1, %q2"
5028  [(set_attr "type" "mve_move")
5029   (set_attr "length""8")])
5030
5031;;
5032;; [vrmlsldavhxq_p_s])
5033;;
5034(define_insn "mve_vrmlsldavhxq_p_sv4si"
5035  [
5036   (set (match_operand:DI 0 "s_register_operand" "=r")
5037	(unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
5038		       (match_operand:V4SI 2 "s_register_operand" "w")
5039		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5040	 VRMLSLDAVHXQ_P_S))
5041  ]
5042  "TARGET_HAVE_MVE"
5043  "vpst\;vrmlsldavhxt.s32 %Q0, %R0, %q1, %q2"
5044  [(set_attr "type" "mve_move")
5045   (set_attr "length""8")])
5046
5047;;
5048;; [vrndaq_m_f])
5049;;
5050(define_insn "mve_vrndaq_m_f<mode>"
5051  [
5052   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
5053	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
5054		       (match_operand:MVE_0 2 "s_register_operand" "w")
5055		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5056	 VRNDAQ_M_F))
5057  ]
5058  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5059  "vpst\;vrintat.f%#<V_sz_elem>	%q0, %q2"
5060  [(set_attr "type" "mve_move")
5061   (set_attr "length""8")])
5062
5063;;
5064;; [vrndmq_m_f])
5065;;
5066(define_insn "mve_vrndmq_m_f<mode>"
5067  [
5068   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
5069	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
5070		       (match_operand:MVE_0 2 "s_register_operand" "w")
5071		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5072	 VRNDMQ_M_F))
5073  ]
5074  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5075  "vpst\;vrintmt.f%#<V_sz_elem>	%q0, %q2"
5076  [(set_attr "type" "mve_move")
5077   (set_attr "length""8")])
5078
5079;;
5080;; [vrndnq_m_f])
5081;;
5082(define_insn "mve_vrndnq_m_f<mode>"
5083  [
5084   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
5085	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
5086		       (match_operand:MVE_0 2 "s_register_operand" "w")
5087		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5088	 VRNDNQ_M_F))
5089  ]
5090  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5091  "vpst\;vrintnt.f%#<V_sz_elem>	%q0, %q2"
5092  [(set_attr "type" "mve_move")
5093   (set_attr "length""8")])
5094
5095;;
5096;; [vrndpq_m_f])
5097;;
5098(define_insn "mve_vrndpq_m_f<mode>"
5099  [
5100   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
5101	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
5102		       (match_operand:MVE_0 2 "s_register_operand" "w")
5103		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5104	 VRNDPQ_M_F))
5105  ]
5106  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5107  "vpst\;vrintpt.f%#<V_sz_elem>	%q0, %q2"
5108  [(set_attr "type" "mve_move")
5109   (set_attr "length""8")])
5110
5111;;
5112;; [vrndxq_m_f])
5113;;
5114(define_insn "mve_vrndxq_m_f<mode>"
5115  [
5116   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
5117	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
5118		       (match_operand:MVE_0 2 "s_register_operand" "w")
5119		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5120	 VRNDXQ_M_F))
5121  ]
5122  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5123  "vpst\;vrintxt.f%#<V_sz_elem>	%q0, %q2"
5124  [(set_attr "type" "mve_move")
5125   (set_attr "length""8")])
5126
5127;;
5128;; [vrshrnbq_n_s, vrshrnbq_n_u])
5129;;
5130(define_insn "mve_vrshrnbq_n_<supf><mode>"
5131  [
5132   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
5133	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
5134		       (match_operand:MVE_5 2 "s_register_operand" "w")
5135		       (match_operand:SI 3 "mve_imm_8" "Rb")]
5136	 VRSHRNBQ_N))
5137  ]
5138  "TARGET_HAVE_MVE"
5139  "vrshrnb.i%#<V_sz_elem>	%q0, %q2, %3"
5140  [(set_attr "type" "mve_move")
5141])
5142
5143;;
5144;; [vrshrntq_n_u, vrshrntq_n_s])
5145;;
5146(define_insn "mve_vrshrntq_n_<supf><mode>"
5147  [
5148   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
5149	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
5150		       (match_operand:MVE_5 2 "s_register_operand" "w")
5151		       (match_operand:SI 3 "mve_imm_8" "Rb")]
5152	 VRSHRNTQ_N))
5153  ]
5154  "TARGET_HAVE_MVE"
5155  "vrshrnt.i%#<V_sz_elem>	%q0, %q2, %3"
5156  [(set_attr "type" "mve_move")
5157])
5158
5159;;
5160;; [vshrnbq_n_u, vshrnbq_n_s])
5161;;
5162(define_insn "mve_vshrnbq_n_<supf><mode>"
5163  [
5164   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
5165	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
5166		       (match_operand:MVE_5 2 "s_register_operand" "w")
5167		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")]
5168	 VSHRNBQ_N))
5169  ]
5170  "TARGET_HAVE_MVE"
5171  "vshrnb.i%#<V_sz_elem>	%q0, %q2, %3"
5172  [(set_attr "type" "mve_move")
5173])
5174
5175;;
5176;; [vshrntq_n_s, vshrntq_n_u])
5177;;
5178(define_insn "mve_vshrntq_n_<supf><mode>"
5179  [
5180   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
5181	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
5182				 (match_operand:MVE_5 2 "s_register_operand" "w")
5183				 (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")]
5184	 VSHRNTQ_N))
5185  ]
5186  "TARGET_HAVE_MVE"
5187  "vshrnt.i%#<V_sz_elem>\t%q0, %q2, %3"
5188  [(set_attr "type" "mve_move")
5189])
5190
5191;;
5192;; [vcvtmq_m_s, vcvtmq_m_u])
5193;;
5194(define_insn "mve_vcvtmq_m_<supf><mode>"
5195  [
5196   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
5197	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
5198		       (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
5199		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5200	 VCVTMQ_M))
5201  ]
5202  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5203  "vpst\;vcvtmt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2"
5204  [(set_attr "type" "mve_move")
5205   (set_attr "length""8")])
5206
5207;;
5208;; [vcvtpq_m_u, vcvtpq_m_s])
5209;;
5210(define_insn "mve_vcvtpq_m_<supf><mode>"
5211  [
5212   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
5213	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
5214		       (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
5215		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5216	 VCVTPQ_M))
5217  ]
5218  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5219  "vpst\;vcvtpt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2"
5220  [(set_attr "type" "mve_move")
5221   (set_attr "length""8")])
5222
5223;;
5224;; [vcvtnq_m_s, vcvtnq_m_u])
5225;;
5226(define_insn "mve_vcvtnq_m_<supf><mode>"
5227  [
5228   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
5229	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
5230		       (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
5231		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5232	 VCVTNQ_M))
5233  ]
5234  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5235  "vpst\;vcvtnt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2"
5236  [(set_attr "type" "mve_move")
5237   (set_attr "length""8")])
5238
5239;;
5240;; [vcvtq_m_n_from_f_s, vcvtq_m_n_from_f_u])
5241;;
5242(define_insn "mve_vcvtq_m_n_from_f_<supf><mode>"
5243  [
5244   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
5245	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
5246		       (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
5247		       (match_operand:SI 3 "<MVE_pred2>" "<MVE_constraint2>")
5248		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5249	 VCVTQ_M_N_FROM_F))
5250  ]
5251  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5252  "vpst\;vcvtt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2, %3"
5253  [(set_attr "type" "mve_move")
5254   (set_attr "length""8")])
5255
5256;;
5257;; [vrev16q_m_u, vrev16q_m_s])
5258;;
5259(define_insn "mve_vrev16q_m_<supf>v16qi"
5260  [
5261   (set (match_operand:V16QI 0 "s_register_operand" "=w")
5262	(unspec:V16QI [(match_operand:V16QI 1 "s_register_operand" "0")
5263		       (match_operand:V16QI 2 "s_register_operand" "w")
5264		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5265	 VREV16Q_M))
5266  ]
5267  "TARGET_HAVE_MVE"
5268  "vpst\;vrev16t.8 %q0, %q2"
5269  [(set_attr "type" "mve_move")
5270   (set_attr "length""8")])
5271
5272;;
5273;; [vcvtq_m_from_f_u, vcvtq_m_from_f_s])
5274;;
5275(define_insn "mve_vcvtq_m_from_f_<supf><mode>"
5276  [
5277   (set (match_operand:MVE_5 0 "s_register_operand" "=w")
5278	(unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
5279		       (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
5280		       (match_operand:HI 3 "vpr_register_operand" "Up")]
5281	 VCVTQ_M_FROM_F))
5282  ]
5283  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5284  "vpst\;vcvtt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2"
5285  [(set_attr "type" "mve_move")
5286   (set_attr "length""8")])
5287
5288;;
5289;; [vrmlaldavhq_p_u vrmlaldavhq_p_s])
5290;;
5291(define_insn "mve_vrmlaldavhq_p_<supf>v4si"
5292  [
5293   (set (match_operand:DI 0 "s_register_operand" "=r")
5294	(unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
5295		    (match_operand:V4SI 2 "s_register_operand" "w")
5296		    (match_operand:HI 3 "vpr_register_operand" "Up")]
5297	 VRMLALDAVHQ_P))
5298  ]
5299  "TARGET_HAVE_MVE"
5300  "vpst\;vrmlaldavht.<supf>32 %Q0, %R0, %q1, %q2"
5301  [(set_attr "type" "mve_move")
5302   (set_attr "length""8")])
5303
5304;;
5305;; [vrmlsldavhaq_s])
5306;;
5307(define_insn "mve_vrmlsldavhaq_sv4si"
5308  [
5309   (set (match_operand:DI 0 "s_register_operand" "=r")
5310	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
5311		    (match_operand:V4SI 2 "s_register_operand" "w")
5312		    (match_operand:V4SI 3 "s_register_operand" "w")]
5313	 VRMLSLDAVHAQ_S))
5314  ]
5315  "TARGET_HAVE_MVE"
5316  "vrmlsldavha.s32 %Q0, %R0, %q2, %q3"
5317  [(set_attr "type" "mve_move")
5318])
5319
5320;;
5321;; [vabavq_p_s, vabavq_p_u])
5322;;
5323(define_insn "mve_vabavq_p_<supf><mode>"
5324  [
5325   (set (match_operand:SI 0 "s_register_operand" "=r")
5326	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
5327		    (match_operand:MVE_2 2 "s_register_operand" "w")
5328		    (match_operand:MVE_2 3 "s_register_operand" "w")
5329		    (match_operand:HI 4 "vpr_register_operand" "Up")]
5330	 VABAVQ_P))
5331  ]
5332  "TARGET_HAVE_MVE"
5333  "vpst\;vabavt.<supf>%#<V_sz_elem>\t%0, %q2, %q3"
5334  [(set_attr "type" "mve_move")
5335])
5336
5337;;
5338;; [vqshluq_m_n_s])
5339;;
5340(define_insn "mve_vqshluq_m_n_s<mode>"
5341  [
5342   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5343	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5344		       (match_operand:MVE_2 2 "s_register_operand" "w")
5345		       (match_operand:SI 3 "mve_imm_7" "Ra")
5346		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5347	 VQSHLUQ_M_N_S))
5348  ]
5349  "TARGET_HAVE_MVE"
5350  "vpst\n\tvqshlut.s%#<V_sz_elem>\t%q0, %q2, %3"
5351  [(set_attr "type" "mve_move")])
5352
5353;;
5354;; [vshlq_m_s, vshlq_m_u])
5355;;
5356(define_insn "mve_vshlq_m_<supf><mode>"
5357  [
5358   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5359	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5360		       (match_operand:MVE_2 2 "s_register_operand" "w")
5361		       (match_operand:MVE_2 3 "s_register_operand" "w")
5362		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5363	 VSHLQ_M))
5364  ]
5365  "TARGET_HAVE_MVE"
5366  "vpst\;vshlt.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
5367  [(set_attr "type" "mve_move")])
5368
5369;;
5370;; [vsriq_m_n_s, vsriq_m_n_u])
5371;;
5372(define_insn "mve_vsriq_m_n_<supf><mode>"
5373  [
5374   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5375	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5376		       (match_operand:MVE_2 2 "s_register_operand" "w")
5377		       (match_operand:SI 3 "mve_imm_selective_upto_8" "Rg")
5378		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5379	 VSRIQ_M_N))
5380  ]
5381  "TARGET_HAVE_MVE"
5382  "vpst\;vsrit.%#<V_sz_elem>\t%q0, %q2, %3"
5383  [(set_attr "type" "mve_move")])
5384
5385;;
5386;; [vsubq_m_u, vsubq_m_s])
5387;;
5388(define_insn "mve_vsubq_m_<supf><mode>"
5389  [
5390   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5391	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5392		       (match_operand:MVE_2 2 "s_register_operand" "w")
5393		       (match_operand:MVE_2 3 "s_register_operand" "w")
5394		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5395	 VSUBQ_M))
5396  ]
5397  "TARGET_HAVE_MVE"
5398  "vpst\;vsubt.i%#<V_sz_elem>\t%q0, %q2, %q3"
5399  [(set_attr "type" "mve_move")])
5400
5401;;
5402;; [vcvtq_m_n_to_f_u, vcvtq_m_n_to_f_s])
5403;;
5404(define_insn "mve_vcvtq_m_n_to_f_<supf><mode>"
5405  [
5406   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
5407	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
5408		       (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
5409		       (match_operand:SI 3 "<MVE_pred2>" "<MVE_constraint2>")
5410		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5411	 VCVTQ_M_N_TO_F))
5412  ]
5413  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5414  "vpst\;vcvtt.f%#<V_sz_elem>.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
5415  [(set_attr "type" "mve_move")
5416   (set_attr "length""8")])
5417;;
5418;; [vabdq_m_s, vabdq_m_u])
5419;;
5420(define_insn "mve_vabdq_m_<supf><mode>"
5421  [
5422   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5423	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5424		       (match_operand:MVE_2 2 "s_register_operand" "w")
5425		       (match_operand:MVE_2 3 "s_register_operand" "w")
5426		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5427	 VABDQ_M))
5428  ]
5429  "TARGET_HAVE_MVE"
5430  "vpst\;vabdt.<supf>%#<V_sz_elem>	%q0, %q2, %q3"
5431  [(set_attr "type" "mve_move")
5432   (set_attr "length""8")])
5433
5434;;
5435;; [vaddq_m_n_s, vaddq_m_n_u])
5436;;
5437(define_insn "mve_vaddq_m_n_<supf><mode>"
5438  [
5439   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5440	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5441		       (match_operand:MVE_2 2 "s_register_operand" "w")
5442		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5443		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5444	 VADDQ_M_N))
5445  ]
5446  "TARGET_HAVE_MVE"
5447  "vpst\;vaddt.i%#<V_sz_elem>	%q0, %q2, %3"
5448  [(set_attr "type" "mve_move")
5449   (set_attr "length""8")])
5450
5451;;
5452;; [vaddq_m_u, vaddq_m_s])
5453;;
5454(define_insn "mve_vaddq_m_<supf><mode>"
5455  [
5456   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5457	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5458		       (match_operand:MVE_2 2 "s_register_operand" "w")
5459		       (match_operand:MVE_2 3 "s_register_operand" "w")
5460		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5461	 VADDQ_M))
5462  ]
5463  "TARGET_HAVE_MVE"
5464  "vpst\;vaddt.i%#<V_sz_elem>	%q0, %q2, %q3"
5465  [(set_attr "type" "mve_move")
5466   (set_attr "length""8")])
5467
5468;;
5469;; [vandq_m_u, vandq_m_s])
5470;;
5471(define_insn "mve_vandq_m_<supf><mode>"
5472  [
5473   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5474	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5475		       (match_operand:MVE_2 2 "s_register_operand" "w")
5476		       (match_operand:MVE_2 3 "s_register_operand" "w")
5477		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5478	 VANDQ_M))
5479  ]
5480  "TARGET_HAVE_MVE"
5481  "vpst\;vandt %q0, %q2, %q3"
5482  [(set_attr "type" "mve_move")
5483   (set_attr "length""8")])
5484
5485;;
5486;; [vbicq_m_u, vbicq_m_s])
5487;;
5488(define_insn "mve_vbicq_m_<supf><mode>"
5489  [
5490   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5491	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5492		       (match_operand:MVE_2 2 "s_register_operand" "w")
5493		       (match_operand:MVE_2 3 "s_register_operand" "w")
5494		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5495	 VBICQ_M))
5496  ]
5497  "TARGET_HAVE_MVE"
5498  "vpst\;vbict %q0, %q2, %q3"
5499  [(set_attr "type" "mve_move")
5500   (set_attr "length""8")])
5501
5502;;
5503;; [vbrsrq_m_n_u, vbrsrq_m_n_s])
5504;;
5505(define_insn "mve_vbrsrq_m_n_<supf><mode>"
5506  [
5507   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5508	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5509		       (match_operand:MVE_2 2 "s_register_operand" "w")
5510		       (match_operand:SI 3 "s_register_operand" "r")
5511		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5512	 VBRSRQ_M_N))
5513  ]
5514  "TARGET_HAVE_MVE"
5515  "vpst\;vbrsrt.%#<V_sz_elem>	%q0, %q2, %3"
5516  [(set_attr "type" "mve_move")
5517   (set_attr "length""8")])
5518
5519;;
5520;; [vcaddq_rot270_m_u, vcaddq_rot270_m_s])
5521;;
5522(define_insn "mve_vcaddq_rot270_m_<supf><mode>"
5523  [
5524   (set (match_operand:MVE_2 0 "s_register_operand" "<earlyclobber_32>")
5525	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5526		       (match_operand:MVE_2 2 "s_register_operand" "w")
5527		       (match_operand:MVE_2 3 "s_register_operand" "w")
5528		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5529	 VCADDQ_ROT270_M))
5530  ]
5531  "TARGET_HAVE_MVE"
5532  "vpst\;vcaddt.i%#<V_sz_elem>	%q0, %q2, %q3, #270"
5533  [(set_attr "type" "mve_move")
5534   (set_attr "length""8")])
5535
5536;;
5537;; [vcaddq_rot90_m_u, vcaddq_rot90_m_s])
5538;;
5539(define_insn "mve_vcaddq_rot90_m_<supf><mode>"
5540  [
5541   (set (match_operand:MVE_2 0 "s_register_operand" "<earlyclobber_32>")
5542	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5543		       (match_operand:MVE_2 2 "s_register_operand" "w")
5544		       (match_operand:MVE_2 3 "s_register_operand" "w")
5545		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5546	 VCADDQ_ROT90_M))
5547  ]
5548  "TARGET_HAVE_MVE"
5549  "vpst\;vcaddt.i%#<V_sz_elem>	%q0, %q2, %q3, #90"
5550  [(set_attr "type" "mve_move")
5551   (set_attr "length""8")])
5552
5553;;
5554;; [veorq_m_s, veorq_m_u])
5555;;
5556(define_insn "mve_veorq_m_<supf><mode>"
5557  [
5558   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5559	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5560		       (match_operand:MVE_2 2 "s_register_operand" "w")
5561		       (match_operand:MVE_2 3 "s_register_operand" "w")
5562		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5563	 VEORQ_M))
5564  ]
5565  "TARGET_HAVE_MVE"
5566  "vpst\;veort %q0, %q2, %q3"
5567  [(set_attr "type" "mve_move")
5568   (set_attr "length""8")])
5569
5570;;
5571;; [vhaddq_m_n_s, vhaddq_m_n_u])
5572;;
5573(define_insn "mve_vhaddq_m_n_<supf><mode>"
5574  [
5575   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5576	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5577		       (match_operand:MVE_2 2 "s_register_operand" "w")
5578		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5579		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5580	 VHADDQ_M_N))
5581  ]
5582  "TARGET_HAVE_MVE"
5583  "vpst\;vhaddt.<supf>%#<V_sz_elem>	%q0, %q2, %3"
5584  [(set_attr "type" "mve_move")
5585   (set_attr "length""8")])
5586
5587;;
5588;; [vhaddq_m_s, vhaddq_m_u])
5589;;
5590(define_insn "mve_vhaddq_m_<supf><mode>"
5591  [
5592   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5593	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5594		       (match_operand:MVE_2 2 "s_register_operand" "w")
5595		       (match_operand:MVE_2 3 "s_register_operand" "w")
5596		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5597	 VHADDQ_M))
5598  ]
5599  "TARGET_HAVE_MVE"
5600  "vpst\;vhaddt.<supf>%#<V_sz_elem>	%q0, %q2, %q3"
5601  [(set_attr "type" "mve_move")
5602   (set_attr "length""8")])
5603
5604;;
5605;; [vhsubq_m_n_s, vhsubq_m_n_u])
5606;;
5607(define_insn "mve_vhsubq_m_n_<supf><mode>"
5608  [
5609   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5610	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5611		       (match_operand:MVE_2 2 "s_register_operand" "w")
5612		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5613		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5614	 VHSUBQ_M_N))
5615  ]
5616  "TARGET_HAVE_MVE"
5617  "vpst\;vhsubt.<supf>%#<V_sz_elem>	%q0, %q2, %3"
5618  [(set_attr "type" "mve_move")
5619   (set_attr "length""8")])
5620
5621;;
5622;; [vhsubq_m_s, vhsubq_m_u])
5623;;
5624(define_insn "mve_vhsubq_m_<supf><mode>"
5625  [
5626   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5627	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5628		       (match_operand:MVE_2 2 "s_register_operand" "w")
5629		       (match_operand:MVE_2 3 "s_register_operand" "w")
5630		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5631	 VHSUBQ_M))
5632  ]
5633  "TARGET_HAVE_MVE"
5634  "vpst\;vhsubt.<supf>%#<V_sz_elem>	%q0, %q2, %q3"
5635  [(set_attr "type" "mve_move")
5636   (set_attr "length""8")])
5637
5638;;
5639;; [vmaxq_m_s, vmaxq_m_u])
5640;;
5641(define_insn "mve_vmaxq_m_<supf><mode>"
5642  [
5643   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5644	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5645		       (match_operand:MVE_2 2 "s_register_operand" "w")
5646		       (match_operand:MVE_2 3 "s_register_operand" "w")
5647		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5648	 VMAXQ_M))
5649  ]
5650  "TARGET_HAVE_MVE"
5651  "vpst\;vmaxt.<supf>%#<V_sz_elem>	%q0, %q2, %q3"
5652  [(set_attr "type" "mve_move")
5653   (set_attr "length""8")])
5654
5655;;
5656;; [vminq_m_s, vminq_m_u])
5657;;
5658(define_insn "mve_vminq_m_<supf><mode>"
5659  [
5660   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5661	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5662		       (match_operand:MVE_2 2 "s_register_operand" "w")
5663		       (match_operand:MVE_2 3 "s_register_operand" "w")
5664		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5665	 VMINQ_M))
5666  ]
5667  "TARGET_HAVE_MVE"
5668  "vpst\;vmint.<supf>%#<V_sz_elem>	%q0, %q2, %q3"
5669  [(set_attr "type" "mve_move")
5670   (set_attr "length""8")])
5671
5672;;
5673;; [vmladavaq_p_u, vmladavaq_p_s])
5674;;
5675(define_insn "mve_vmladavaq_p_<supf><mode>"
5676  [
5677   (set (match_operand:SI 0 "s_register_operand" "=Te")
5678	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
5679		    (match_operand:MVE_2 2 "s_register_operand" "w")
5680		    (match_operand:MVE_2 3 "s_register_operand" "w")
5681		    (match_operand:HI 4 "vpr_register_operand" "Up")]
5682	 VMLADAVAQ_P))
5683  ]
5684  "TARGET_HAVE_MVE"
5685  "vpst\;vmladavat.<supf>%#<V_sz_elem>	%0, %q2, %q3"
5686  [(set_attr "type" "mve_move")
5687   (set_attr "length""8")])
5688
5689;;
5690;; [vmlaq_m_n_s, vmlaq_m_n_u])
5691;;
5692(define_insn "mve_vmlaq_m_n_<supf><mode>"
5693  [
5694   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5695	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5696		       (match_operand:MVE_2 2 "s_register_operand" "w")
5697		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5698		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5699	 VMLAQ_M_N))
5700  ]
5701  "TARGET_HAVE_MVE"
5702  "vpst\;vmlat.<supf>%#<V_sz_elem>	%q0, %q2, %3"
5703  [(set_attr "type" "mve_move")
5704   (set_attr "length""8")])
5705
5706;;
5707;; [vmlasq_m_n_u, vmlasq_m_n_s])
5708;;
5709(define_insn "mve_vmlasq_m_n_<supf><mode>"
5710  [
5711   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5712	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5713		       (match_operand:MVE_2 2 "s_register_operand" "w")
5714		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5715		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5716	 VMLASQ_M_N))
5717  ]
5718  "TARGET_HAVE_MVE"
5719  "vpst\;vmlast.<supf>%#<V_sz_elem>	%q0, %q2, %3"
5720  [(set_attr "type" "mve_move")
5721   (set_attr "length""8")])
5722
5723;;
5724;; [vmulhq_m_s, vmulhq_m_u])
5725;;
5726(define_insn "mve_vmulhq_m_<supf><mode>"
5727  [
5728   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5729	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5730		       (match_operand:MVE_2 2 "s_register_operand" "w")
5731		       (match_operand:MVE_2 3 "s_register_operand" "w")
5732		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5733	 VMULHQ_M))
5734  ]
5735  "TARGET_HAVE_MVE"
5736  "vpst\;vmulht.<supf>%#<V_sz_elem>	%q0, %q2, %q3"
5737  [(set_attr "type" "mve_move")
5738   (set_attr "length""8")])
5739
5740;;
5741;; [vmullbq_int_m_u, vmullbq_int_m_s])
5742;;
5743(define_insn "mve_vmullbq_int_m_<supf><mode>"
5744  [
5745   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
5746	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
5747				  (match_operand:MVE_2 2 "s_register_operand" "w")
5748				  (match_operand:MVE_2 3 "s_register_operand" "w")
5749				  (match_operand:HI 4 "vpr_register_operand" "Up")]
5750	 VMULLBQ_INT_M))
5751  ]
5752  "TARGET_HAVE_MVE"
5753  "vpst\;vmullbt.<supf>%#<V_sz_elem>	%q0, %q2, %q3"
5754  [(set_attr "type" "mve_move")
5755   (set_attr "length""8")])
5756
5757;;
5758;; [vmulltq_int_m_s, vmulltq_int_m_u])
5759;;
5760(define_insn "mve_vmulltq_int_m_<supf><mode>"
5761  [
5762   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
5763	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
5764				  (match_operand:MVE_2 2 "s_register_operand" "w")
5765				  (match_operand:MVE_2 3 "s_register_operand" "w")
5766				  (match_operand:HI 4 "vpr_register_operand" "Up")]
5767	 VMULLTQ_INT_M))
5768  ]
5769  "TARGET_HAVE_MVE"
5770  "vpst\;vmulltt.<supf>%#<V_sz_elem>	%q0, %q2, %q3"
5771  [(set_attr "type" "mve_move")
5772   (set_attr "length""8")])
5773
5774;;
5775;; [vmulq_m_n_u, vmulq_m_n_s])
5776;;
5777(define_insn "mve_vmulq_m_n_<supf><mode>"
5778  [
5779   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5780	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5781		       (match_operand:MVE_2 2 "s_register_operand" "w")
5782		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5783		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5784	 VMULQ_M_N))
5785  ]
5786  "TARGET_HAVE_MVE"
5787  "vpst\;vmult.i%#<V_sz_elem>	%q0, %q2, %3"
5788  [(set_attr "type" "mve_move")
5789   (set_attr "length""8")])
5790
5791;;
5792;; [vmulq_m_s, vmulq_m_u])
5793;;
5794(define_insn "mve_vmulq_m_<supf><mode>"
5795  [
5796   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5797	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5798		       (match_operand:MVE_2 2 "s_register_operand" "w")
5799		       (match_operand:MVE_2 3 "s_register_operand" "w")
5800		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5801	 VMULQ_M))
5802  ]
5803  "TARGET_HAVE_MVE"
5804  "vpst\;vmult.i%#<V_sz_elem>	%q0, %q2, %q3"
5805  [(set_attr "type" "mve_move")
5806   (set_attr "length""8")])
5807
5808;;
5809;; [vornq_m_u, vornq_m_s])
5810;;
5811(define_insn "mve_vornq_m_<supf><mode>"
5812  [
5813   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5814	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5815		       (match_operand:MVE_2 2 "s_register_operand" "w")
5816		       (match_operand:MVE_2 3 "s_register_operand" "w")
5817		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5818	 VORNQ_M))
5819  ]
5820  "TARGET_HAVE_MVE"
5821  "vpst\;vornt %q0, %q2, %q3"
5822  [(set_attr "type" "mve_move")
5823   (set_attr "length""8")])
5824
5825;;
5826;; [vorrq_m_s, vorrq_m_u])
5827;;
5828(define_insn "mve_vorrq_m_<supf><mode>"
5829  [
5830   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5831	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5832		       (match_operand:MVE_2 2 "s_register_operand" "w")
5833		       (match_operand:MVE_2 3 "s_register_operand" "w")
5834		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5835	 VORRQ_M))
5836  ]
5837  "TARGET_HAVE_MVE"
5838  "vpst\;vorrt %q0, %q2, %q3"
5839  [(set_attr "type" "mve_move")
5840   (set_attr "length""8")])
5841
5842;;
5843;; [vqaddq_m_n_u, vqaddq_m_n_s])
5844;;
5845(define_insn "mve_vqaddq_m_n_<supf><mode>"
5846  [
5847   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5848	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5849		       (match_operand:MVE_2 2 "s_register_operand" "w")
5850		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5851		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5852	 VQADDQ_M_N))
5853  ]
5854  "TARGET_HAVE_MVE"
5855  "vpst\;vqaddt.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
5856  [(set_attr "type" "mve_move")
5857   (set_attr "length""8")])
5858
5859;;
5860;; [vqaddq_m_u, vqaddq_m_s])
5861;;
5862(define_insn "mve_vqaddq_m_<supf><mode>"
5863  [
5864   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5865	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5866		       (match_operand:MVE_2 2 "s_register_operand" "w")
5867		       (match_operand:MVE_2 3 "s_register_operand" "w")
5868		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5869	 VQADDQ_M))
5870  ]
5871  "TARGET_HAVE_MVE"
5872  "vpst\;vqaddt.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
5873  [(set_attr "type" "mve_move")
5874   (set_attr "length""8")])
5875
5876;;
5877;; [vqdmlahq_m_n_s])
5878;;
5879(define_insn "mve_vqdmlahq_m_n_s<mode>"
5880  [
5881   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5882	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5883		       (match_operand:MVE_2 2 "s_register_operand" "w")
5884		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5885		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5886	 VQDMLAHQ_M_N_S))
5887  ]
5888  "TARGET_HAVE_MVE"
5889  "vpst\;vqdmlaht.s%#<V_sz_elem>\t%q0, %q2, %3"
5890  [(set_attr "type" "mve_move")
5891   (set_attr "length""8")])
5892
5893;;
5894;; [vqdmlashq_m_n_s])
5895;;
5896(define_insn "mve_vqdmlashq_m_n_s<mode>"
5897  [
5898   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5899	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5900		       (match_operand:MVE_2 2 "s_register_operand" "w")
5901		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5902		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5903	 VQDMLASHQ_M_N_S))
5904  ]
5905  "TARGET_HAVE_MVE"
5906  "vpst\;vqdmlasht.s%#<V_sz_elem>\t%q0, %q2, %3"
5907  [(set_attr "type" "mve_move")
5908   (set_attr "length""8")])
5909
5910;;
5911;; [vqrdmlahq_m_n_s])
5912;;
5913(define_insn "mve_vqrdmlahq_m_n_s<mode>"
5914  [
5915   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5916	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5917		       (match_operand:MVE_2 2 "s_register_operand" "w")
5918		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5919		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5920	 VQRDMLAHQ_M_N_S))
5921  ]
5922  "TARGET_HAVE_MVE"
5923  "vpst\;vqrdmlaht.s%#<V_sz_elem>\t%q0, %q2, %3"
5924  [(set_attr "type" "mve_move")
5925   (set_attr "length""8")])
5926
5927;;
5928;; [vqrdmlashq_m_n_s])
5929;;
5930(define_insn "mve_vqrdmlashq_m_n_s<mode>"
5931  [
5932   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5933	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5934		       (match_operand:MVE_2 2 "s_register_operand" "w")
5935		       (match_operand:<V_elem> 3 "s_register_operand" "r")
5936		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5937	 VQRDMLASHQ_M_N_S))
5938  ]
5939  "TARGET_HAVE_MVE"
5940  "vpst\;vqrdmlasht.s%#<V_sz_elem>\t%q0, %q2, %3"
5941  [(set_attr "type" "mve_move")
5942   (set_attr "length""8")])
5943
5944;;
5945;; [vqrshlq_m_u, vqrshlq_m_s])
5946;;
5947(define_insn "mve_vqrshlq_m_<supf><mode>"
5948  [
5949   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5950	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5951		       (match_operand:MVE_2 2 "s_register_operand" "w")
5952		       (match_operand:MVE_2 3 "s_register_operand" "w")
5953		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5954	 VQRSHLQ_M))
5955  ]
5956  "TARGET_HAVE_MVE"
5957  "vpst\;vqrshlt.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
5958  [(set_attr "type" "mve_move")
5959   (set_attr "length""8")])
5960
5961;;
5962;; [vqshlq_m_n_s, vqshlq_m_n_u])
5963;;
5964(define_insn "mve_vqshlq_m_n_<supf><mode>"
5965  [
5966   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5967	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5968		       (match_operand:MVE_2 2 "s_register_operand" "w")
5969		       (match_operand:SI 3 "immediate_operand" "i")
5970		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5971	 VQSHLQ_M_N))
5972  ]
5973  "TARGET_HAVE_MVE"
5974  "vpst\;vqshlt.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
5975  [(set_attr "type" "mve_move")
5976   (set_attr "length""8")])
5977
5978;;
5979;; [vqshlq_m_u, vqshlq_m_s])
5980;;
5981(define_insn "mve_vqshlq_m_<supf><mode>"
5982  [
5983   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
5984	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5985		       (match_operand:MVE_2 2 "s_register_operand" "w")
5986		       (match_operand:MVE_2 3 "s_register_operand" "w")
5987		       (match_operand:HI 4 "vpr_register_operand" "Up")]
5988	 VQSHLQ_M))
5989  ]
5990  "TARGET_HAVE_MVE"
5991  "vpst\;vqshlt.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
5992  [(set_attr "type" "mve_move")
5993   (set_attr "length""8")])
5994
5995;;
5996;; [vqsubq_m_n_u, vqsubq_m_n_s])
5997;;
5998(define_insn "mve_vqsubq_m_n_<supf><mode>"
5999  [
6000   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6001	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6002		       (match_operand:MVE_2 2 "s_register_operand" "w")
6003		       (match_operand:<V_elem> 3 "s_register_operand" "r")
6004		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6005	 VQSUBQ_M_N))
6006  ]
6007  "TARGET_HAVE_MVE"
6008  "vpst\;vqsubt.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
6009  [(set_attr "type" "mve_move")
6010   (set_attr "length""8")])
6011
6012;;
6013;; [vqsubq_m_u, vqsubq_m_s])
6014;;
6015(define_insn "mve_vqsubq_m_<supf><mode>"
6016  [
6017   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6018	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6019		       (match_operand:MVE_2 2 "s_register_operand" "w")
6020		       (match_operand:MVE_2 3 "s_register_operand" "w")
6021		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6022	 VQSUBQ_M))
6023  ]
6024  "TARGET_HAVE_MVE"
6025  "vpst\;vqsubt.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
6026  [(set_attr "type" "mve_move")
6027   (set_attr "length""8")])
6028
6029;;
6030;; [vrhaddq_m_u, vrhaddq_m_s])
6031;;
6032(define_insn "mve_vrhaddq_m_<supf><mode>"
6033  [
6034   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6035	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6036		       (match_operand:MVE_2 2 "s_register_operand" "w")
6037		       (match_operand:MVE_2 3 "s_register_operand" "w")
6038		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6039	 VRHADDQ_M))
6040  ]
6041  "TARGET_HAVE_MVE"
6042  "vpst\;vrhaddt.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
6043  [(set_attr "type" "mve_move")
6044   (set_attr "length""8")])
6045
6046;;
6047;; [vrmulhq_m_u, vrmulhq_m_s])
6048;;
6049(define_insn "mve_vrmulhq_m_<supf><mode>"
6050  [
6051   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6052	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6053		       (match_operand:MVE_2 2 "s_register_operand" "w")
6054		       (match_operand:MVE_2 3 "s_register_operand" "w")
6055		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6056	 VRMULHQ_M))
6057  ]
6058  "TARGET_HAVE_MVE"
6059  "vpst\;vrmulht.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
6060  [(set_attr "type" "mve_move")
6061   (set_attr "length""8")])
6062
6063;;
6064;; [vrshlq_m_s, vrshlq_m_u])
6065;;
6066(define_insn "mve_vrshlq_m_<supf><mode>"
6067  [
6068   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6069	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6070		       (match_operand:MVE_2 2 "s_register_operand" "w")
6071		       (match_operand:MVE_2 3 "s_register_operand" "w")
6072		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6073	 VRSHLQ_M))
6074  ]
6075  "TARGET_HAVE_MVE"
6076  "vpst\;vrshlt.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
6077  [(set_attr "type" "mve_move")
6078   (set_attr "length""8")])
6079
6080;;
6081;; [vrshrq_m_n_s, vrshrq_m_n_u])
6082;;
6083(define_insn "mve_vrshrq_m_n_<supf><mode>"
6084  [
6085   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6086	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6087		       (match_operand:MVE_2 2 "s_register_operand" "w")
6088		       (match_operand:SI 3 "<MVE_pred2>" "<MVE_constraint2>")
6089		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6090	 VRSHRQ_M_N))
6091  ]
6092  "TARGET_HAVE_MVE"
6093  "vpst\;vrshrt.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
6094  [(set_attr "type" "mve_move")
6095   (set_attr "length""8")])
6096
6097;;
6098;; [vshlq_m_n_s, vshlq_m_n_u])
6099;;
6100(define_insn "mve_vshlq_m_n_<supf><mode>"
6101  [
6102   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6103	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6104		       (match_operand:MVE_2 2 "s_register_operand" "w")
6105		       (match_operand:SI 3 "immediate_operand" "i")
6106		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6107	 VSHLQ_M_N))
6108  ]
6109  "TARGET_HAVE_MVE"
6110  "vpst\;vshlt.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
6111  [(set_attr "type" "mve_move")
6112   (set_attr "length""8")])
6113
6114;;
6115;; [vshrq_m_n_s, vshrq_m_n_u])
6116;;
6117(define_insn "mve_vshrq_m_n_<supf><mode>"
6118  [
6119   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6120	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6121		       (match_operand:MVE_2 2 "s_register_operand" "w")
6122		       (match_operand:SI 3 "<MVE_pred2>" "<MVE_constraint2>")
6123		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6124	 VSHRQ_M_N))
6125  ]
6126  "TARGET_HAVE_MVE"
6127  "vpst\;vshrt.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
6128  [(set_attr "type" "mve_move")
6129   (set_attr "length""8")])
6130
6131;;
6132;; [vsliq_m_n_u, vsliq_m_n_s])
6133;;
6134(define_insn "mve_vsliq_m_n_<supf><mode>"
6135   [
6136   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6137       (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6138		       (match_operand:MVE_2 2 "s_register_operand" "w")
6139		       (match_operand:SI 3 "<MVE_pred>" "<MVE_constraint>")
6140		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6141	 VSLIQ_M_N))
6142  ]
6143  "TARGET_HAVE_MVE"
6144  "vpst\;vslit.%#<V_sz_elem>\t%q0, %q2, %3"
6145  [(set_attr "type" "mve_move")
6146   (set_attr "length""8")])
6147
6148;;
6149;; [vsubq_m_n_s, vsubq_m_n_u])
6150;;
6151(define_insn "mve_vsubq_m_n_<supf><mode>"
6152  [
6153   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6154	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6155		       (match_operand:MVE_2 2 "s_register_operand" "w")
6156		       (match_operand:<V_elem> 3 "s_register_operand" "r")
6157		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6158	 VSUBQ_M_N))
6159  ]
6160  "TARGET_HAVE_MVE"
6161  "vpst\;vsubt.i%#<V_sz_elem>\t%q0, %q2, %3"
6162  [(set_attr "type" "mve_move")
6163   (set_attr "length""8")])
6164
6165;;
6166;; [vhcaddq_rot270_m_s])
6167;;
6168(define_insn "mve_vhcaddq_rot270_m_s<mode>"
6169  [
6170   (set (match_operand:MVE_2 0 "s_register_operand" "<earlyclobber_32>")
6171	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6172		       (match_operand:MVE_2 2 "s_register_operand" "w")
6173		       (match_operand:MVE_2 3 "s_register_operand" "w")
6174		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6175	 VHCADDQ_ROT270_M_S))
6176  ]
6177  "TARGET_HAVE_MVE"
6178  "vpst\;vhcaddt.s%#<V_sz_elem>\t%q0, %q2, %q3, #270"
6179  [(set_attr "type" "mve_move")
6180   (set_attr "length""8")])
6181
6182;;
6183;; [vhcaddq_rot90_m_s])
6184;;
6185(define_insn "mve_vhcaddq_rot90_m_s<mode>"
6186  [
6187   (set (match_operand:MVE_2 0 "s_register_operand" "<earlyclobber_32>")
6188	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6189		       (match_operand:MVE_2 2 "s_register_operand" "w")
6190		       (match_operand:MVE_2 3 "s_register_operand" "w")
6191		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6192	 VHCADDQ_ROT90_M_S))
6193  ]
6194  "TARGET_HAVE_MVE"
6195  "vpst\;vhcaddt.s%#<V_sz_elem>\t%q0, %q2, %q3, #90"
6196  [(set_attr "type" "mve_move")
6197   (set_attr "length""8")])
6198
6199;;
6200;; [vmladavaxq_p_s])
6201;;
6202(define_insn "mve_vmladavaxq_p_s<mode>"
6203  [
6204   (set (match_operand:SI 0 "s_register_operand" "=Te")
6205	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
6206		       (match_operand:MVE_2 2 "s_register_operand" "w")
6207		       (match_operand:MVE_2 3 "s_register_operand" "w")
6208		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6209	 VMLADAVAXQ_P_S))
6210  ]
6211  "TARGET_HAVE_MVE"
6212  "vpst\;vmladavaxt.s%#<V_sz_elem>\t%0, %q2, %q3"
6213  [(set_attr "type" "mve_move")
6214   (set_attr "length""8")])
6215
6216;;
6217;; [vmlsdavaq_p_s])
6218;;
6219(define_insn "mve_vmlsdavaq_p_s<mode>"
6220  [
6221   (set (match_operand:SI 0 "s_register_operand" "=Te")
6222	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
6223		       (match_operand:MVE_2 2 "s_register_operand" "w")
6224		       (match_operand:MVE_2 3 "s_register_operand" "w")
6225		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6226	 VMLSDAVAQ_P_S))
6227  ]
6228  "TARGET_HAVE_MVE"
6229  "vpst\;vmlsdavat.s%#<V_sz_elem>\t%0, %q2, %q3"
6230  [(set_attr "type" "mve_move")
6231   (set_attr "length""8")])
6232
6233;;
6234;; [vmlsdavaxq_p_s])
6235;;
6236(define_insn "mve_vmlsdavaxq_p_s<mode>"
6237  [
6238   (set (match_operand:SI 0 "s_register_operand" "=Te")
6239	(unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
6240		       (match_operand:MVE_2 2 "s_register_operand" "w")
6241		       (match_operand:MVE_2 3 "s_register_operand" "w")
6242		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6243	 VMLSDAVAXQ_P_S))
6244  ]
6245  "TARGET_HAVE_MVE"
6246  "vpst\;vmlsdavaxt.s%#<V_sz_elem>\t%0, %q2, %q3"
6247  [(set_attr "type" "mve_move")
6248   (set_attr "length""8")])
6249
6250;;
6251;; [vqdmladhq_m_s])
6252;;
6253(define_insn "mve_vqdmladhq_m_s<mode>"
6254  [
6255   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6256	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6257		       (match_operand:MVE_2 2 "s_register_operand" "w")
6258		       (match_operand:MVE_2 3 "s_register_operand" "w")
6259		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6260	 VQDMLADHQ_M_S))
6261  ]
6262  "TARGET_HAVE_MVE"
6263  "vpst\;vqdmladht.s%#<V_sz_elem>\t%q0, %q2, %q3"
6264  [(set_attr "type" "mve_move")
6265   (set_attr "length""8")])
6266
6267;;
6268;; [vqdmladhxq_m_s])
6269;;
6270(define_insn "mve_vqdmladhxq_m_s<mode>"
6271  [
6272   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6273	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6274		       (match_operand:MVE_2 2 "s_register_operand" "w")
6275		       (match_operand:MVE_2 3 "s_register_operand" "w")
6276		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6277	 VQDMLADHXQ_M_S))
6278  ]
6279  "TARGET_HAVE_MVE"
6280  "vpst\;vqdmladhxt.s%#<V_sz_elem>\t%q0, %q2, %q3"
6281  [(set_attr "type" "mve_move")
6282   (set_attr "length""8")])
6283
6284;;
6285;; [vqdmlsdhq_m_s])
6286;;
6287(define_insn "mve_vqdmlsdhq_m_s<mode>"
6288  [
6289   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6290	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6291		       (match_operand:MVE_2 2 "s_register_operand" "w")
6292		       (match_operand:MVE_2 3 "s_register_operand" "w")
6293		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6294	 VQDMLSDHQ_M_S))
6295  ]
6296  "TARGET_HAVE_MVE"
6297  "vpst\;vqdmlsdht.s%#<V_sz_elem>\t%q0, %q2, %q3"
6298  [(set_attr "type" "mve_move")
6299   (set_attr "length""8")])
6300
6301;;
6302;; [vqdmlsdhxq_m_s])
6303;;
6304(define_insn "mve_vqdmlsdhxq_m_s<mode>"
6305  [
6306   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6307	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6308		       (match_operand:MVE_2 2 "s_register_operand" "w")
6309		       (match_operand:MVE_2 3 "s_register_operand" "w")
6310		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6311	 VQDMLSDHXQ_M_S))
6312  ]
6313  "TARGET_HAVE_MVE"
6314  "vpst\;vqdmlsdhxt.s%#<V_sz_elem>\t%q0, %q2, %q3"
6315  [(set_attr "type" "mve_move")
6316   (set_attr "length""8")])
6317
6318;;
6319;; [vqdmulhq_m_n_s])
6320;;
6321(define_insn "mve_vqdmulhq_m_n_s<mode>"
6322  [
6323   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6324	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6325		       (match_operand:MVE_2 2 "s_register_operand" "w")
6326		       (match_operand:<V_elem> 3 "s_register_operand" "r")
6327		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6328	 VQDMULHQ_M_N_S))
6329  ]
6330  "TARGET_HAVE_MVE"
6331  "vpst\;vqdmulht.s%#<V_sz_elem>\t%q0, %q2, %3"
6332  [(set_attr "type" "mve_move")
6333   (set_attr "length""8")])
6334
6335;;
6336;; [vqdmulhq_m_s])
6337;;
6338(define_insn "mve_vqdmulhq_m_s<mode>"
6339  [
6340   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6341	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6342		       (match_operand:MVE_2 2 "s_register_operand" "w")
6343		       (match_operand:MVE_2 3 "s_register_operand" "w")
6344		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6345	 VQDMULHQ_M_S))
6346  ]
6347  "TARGET_HAVE_MVE"
6348  "vpst\;vqdmulht.s%#<V_sz_elem>\t%q0, %q2, %q3"
6349  [(set_attr "type" "mve_move")
6350   (set_attr "length""8")])
6351
6352;;
6353;; [vqrdmladhq_m_s])
6354;;
6355(define_insn "mve_vqrdmladhq_m_s<mode>"
6356  [
6357   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6358	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6359		       (match_operand:MVE_2 2 "s_register_operand" "w")
6360		       (match_operand:MVE_2 3 "s_register_operand" "w")
6361		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6362	 VQRDMLADHQ_M_S))
6363  ]
6364  "TARGET_HAVE_MVE"
6365  "vpst\;vqrdmladht.s%#<V_sz_elem>\t%q0, %q2, %q3"
6366  [(set_attr "type" "mve_move")
6367   (set_attr "length""8")])
6368
6369;;
6370;; [vqrdmladhxq_m_s])
6371;;
6372(define_insn "mve_vqrdmladhxq_m_s<mode>"
6373  [
6374   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6375	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6376		       (match_operand:MVE_2 2 "s_register_operand" "w")
6377		       (match_operand:MVE_2 3 "s_register_operand" "w")
6378		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6379	 VQRDMLADHXQ_M_S))
6380  ]
6381  "TARGET_HAVE_MVE"
6382  "vpst\;vqrdmladhxt.s%#<V_sz_elem>\t%q0, %q2, %q3"
6383  [(set_attr "type" "mve_move")
6384   (set_attr "length""8")])
6385
6386;;
6387;; [vqrdmlsdhq_m_s])
6388;;
6389(define_insn "mve_vqrdmlsdhq_m_s<mode>"
6390  [
6391   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6392	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6393		       (match_operand:MVE_2 2 "s_register_operand" "w")
6394		       (match_operand:MVE_2 3 "s_register_operand" "w")
6395		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6396	 VQRDMLSDHQ_M_S))
6397  ]
6398  "TARGET_HAVE_MVE"
6399  "vpst\;vqrdmlsdht.s%#<V_sz_elem>\t%q0, %q2, %q3"
6400  [(set_attr "type" "mve_move")
6401   (set_attr "length""8")])
6402
6403;;
6404;; [vqrdmlsdhxq_m_s])
6405;;
6406(define_insn "mve_vqrdmlsdhxq_m_s<mode>"
6407  [
6408   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6409	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6410		       (match_operand:MVE_2 2 "s_register_operand" "w")
6411		       (match_operand:MVE_2 3 "s_register_operand" "w")
6412		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6413	 VQRDMLSDHXQ_M_S))
6414  ]
6415  "TARGET_HAVE_MVE"
6416  "vpst\;vqrdmlsdhxt.s%#<V_sz_elem>\t%q0, %q2, %q3"
6417  [(set_attr "type" "mve_move")
6418   (set_attr "length""8")])
6419
6420;;
6421;; [vqrdmulhq_m_n_s])
6422;;
6423(define_insn "mve_vqrdmulhq_m_n_s<mode>"
6424  [
6425   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6426	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6427		       (match_operand:MVE_2 2 "s_register_operand" "w")
6428		       (match_operand:<V_elem> 3 "s_register_operand" "r")
6429		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6430	 VQRDMULHQ_M_N_S))
6431  ]
6432  "TARGET_HAVE_MVE"
6433  "vpst\;vqrdmulht.s%#<V_sz_elem>\t%q0, %q2, %3"
6434  [(set_attr "type" "mve_move")
6435   (set_attr "length""8")])
6436
6437;;
6438;; [vqrdmulhq_m_s])
6439;;
6440(define_insn "mve_vqrdmulhq_m_s<mode>"
6441  [
6442   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
6443	(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
6444		       (match_operand:MVE_2 2 "s_register_operand" "w")
6445		       (match_operand:MVE_2 3 "s_register_operand" "w")
6446		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6447	 VQRDMULHQ_M_S))
6448  ]
6449  "TARGET_HAVE_MVE"
6450  "vpst\;vqrdmulht.s%#<V_sz_elem>\t%q0, %q2, %q3"
6451  [(set_attr "type" "mve_move")
6452   (set_attr "length""8")])
6453
6454;;
6455;; [vmlaldavaq_p_u, vmlaldavaq_p_s])
6456;;
6457(define_insn "mve_vmlaldavaq_p_<supf><mode>"
6458  [
6459   (set (match_operand:DI 0 "s_register_operand" "=r")
6460	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
6461		       (match_operand:MVE_5 2 "s_register_operand" "w")
6462		       (match_operand:MVE_5 3 "s_register_operand" "w")
6463		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6464	 VMLALDAVAQ_P))
6465  ]
6466  "TARGET_HAVE_MVE"
6467  "vpst\;vmlaldavat.<supf>%#<V_sz_elem>	%Q0, %R0, %q2, %q3"
6468  [(set_attr "type" "mve_move")
6469   (set_attr "length""8")])
6470
6471;;
6472;; [vmlaldavaxq_p_s])
6473;;
6474(define_insn "mve_vmlaldavaxq_p_<supf><mode>"
6475  [
6476   (set (match_operand:DI 0 "s_register_operand" "=r")
6477	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
6478		       (match_operand:MVE_5 2 "s_register_operand" "w")
6479		       (match_operand:MVE_5 3 "s_register_operand" "w")
6480		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6481	 VMLALDAVAXQ_P))
6482  ]
6483  "TARGET_HAVE_MVE"
6484  "vpst\;vmlaldavaxt.<supf>%#<V_sz_elem> %Q0, %R0, %q2, %q3"
6485  [(set_attr "type" "mve_move")
6486   (set_attr "length""8")])
6487
6488;;
6489;; [vqrshrnbq_m_n_u, vqrshrnbq_m_n_s])
6490;;
6491(define_insn "mve_vqrshrnbq_m_n_<supf><mode>"
6492  [
6493   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6494	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6495		       (match_operand:MVE_5 2 "s_register_operand" "w")
6496		       (match_operand:SI 3 "mve_imm_8" "Rb")
6497		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6498	 VQRSHRNBQ_M_N))
6499  ]
6500  "TARGET_HAVE_MVE"
6501  "vpst\;vqrshrnbt.<supf>%#<V_sz_elem>	%q0, %q2, %3"
6502  [(set_attr "type" "mve_move")
6503   (set_attr "length""8")])
6504
6505;;
6506;; [vqrshrntq_m_n_s, vqrshrntq_m_n_u])
6507;;
6508(define_insn "mve_vqrshrntq_m_n_<supf><mode>"
6509  [
6510   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6511	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6512		       (match_operand:MVE_5 2 "s_register_operand" "w")
6513		       (match_operand:SI 3 "mve_imm_8" "Rb")
6514		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6515	 VQRSHRNTQ_M_N))
6516  ]
6517  "TARGET_HAVE_MVE"
6518  "vpst\;vqrshrntt.<supf>%#<V_sz_elem>	%q0, %q2, %3"
6519  [(set_attr "type" "mve_move")
6520   (set_attr "length""8")])
6521
6522;;
6523;; [vqshrnbq_m_n_u, vqshrnbq_m_n_s])
6524;;
6525(define_insn "mve_vqshrnbq_m_n_<supf><mode>"
6526  [
6527   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6528	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6529		       (match_operand:MVE_5 2 "s_register_operand" "w")
6530		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")
6531		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6532	 VQSHRNBQ_M_N))
6533  ]
6534  "TARGET_HAVE_MVE"
6535  "vpst\n\tvqshrnbt.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
6536  [(set_attr "type" "mve_move")
6537   (set_attr "length""8")])
6538
6539;;
6540;; [vqshrntq_m_n_s, vqshrntq_m_n_u])
6541;;
6542(define_insn "mve_vqshrntq_m_n_<supf><mode>"
6543  [
6544   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6545	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6546		       (match_operand:MVE_5 2 "s_register_operand" "w")
6547		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")
6548		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6549	 VQSHRNTQ_M_N))
6550  ]
6551  "TARGET_HAVE_MVE"
6552  "vpst\;vqshrntt.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
6553  [(set_attr "type" "mve_move")
6554   (set_attr "length""8")])
6555
6556;;
6557;; [vrmlaldavhaq_p_s])
6558;;
6559(define_insn "mve_vrmlaldavhaq_p_sv4si"
6560  [
6561   (set (match_operand:DI 0 "s_register_operand" "=r")
6562	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
6563		       (match_operand:V4SI 2 "s_register_operand" "w")
6564		       (match_operand:V4SI 3 "s_register_operand" "w")
6565		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6566	 VRMLALDAVHAQ_P_S))
6567  ]
6568  "TARGET_HAVE_MVE"
6569  "vpst\;vrmlaldavhat.s32\t%Q0, %R0, %q2, %q3"
6570  [(set_attr "type" "mve_move")
6571   (set_attr "length""8")])
6572
6573;;
6574;; [vrshrnbq_m_n_u, vrshrnbq_m_n_s])
6575;;
6576(define_insn "mve_vrshrnbq_m_n_<supf><mode>"
6577  [
6578   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6579	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6580		       (match_operand:MVE_5 2 "s_register_operand" "w")
6581		       (match_operand:SI 3 "mve_imm_8" "Rb")
6582		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6583	 VRSHRNBQ_M_N))
6584  ]
6585  "TARGET_HAVE_MVE"
6586  "vpst\;vrshrnbt.i%#<V_sz_elem>\t%q0, %q2, %3"
6587  [(set_attr "type" "mve_move")
6588   (set_attr "length""8")])
6589
6590;;
6591;; [vrshrntq_m_n_u, vrshrntq_m_n_s])
6592;;
6593(define_insn "mve_vrshrntq_m_n_<supf><mode>"
6594  [
6595   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6596	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6597		       (match_operand:MVE_5 2 "s_register_operand" "w")
6598		       (match_operand:SI 3 "mve_imm_8" "Rb")
6599		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6600	 VRSHRNTQ_M_N))
6601  ]
6602  "TARGET_HAVE_MVE"
6603  "vpst\;vrshrntt.i%#<V_sz_elem>\t%q0, %q2, %3"
6604  [(set_attr "type" "mve_move")
6605   (set_attr "length""8")])
6606
6607;;
6608;; [vshllbq_m_n_u, vshllbq_m_n_s])
6609;;
6610(define_insn "mve_vshllbq_m_n_<supf><mode>"
6611  [
6612   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
6613	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
6614		       (match_operand:MVE_3 2 "s_register_operand" "w")
6615		       (match_operand:SI 3 "immediate_operand" "i")
6616		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6617	 VSHLLBQ_M_N))
6618  ]
6619  "TARGET_HAVE_MVE"
6620  "vpst\;vshllbt.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
6621  [(set_attr "type" "mve_move")
6622   (set_attr "length""8")])
6623
6624;;
6625;; [vshlltq_m_n_u, vshlltq_m_n_s])
6626;;
6627(define_insn "mve_vshlltq_m_n_<supf><mode>"
6628  [
6629   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
6630	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
6631		       (match_operand:MVE_3 2 "s_register_operand" "w")
6632		       (match_operand:SI 3 "immediate_operand" "i")
6633		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6634	 VSHLLTQ_M_N))
6635  ]
6636  "TARGET_HAVE_MVE"
6637  "vpst\;vshlltt.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
6638  [(set_attr "type" "mve_move")
6639   (set_attr "length""8")])
6640
6641;;
6642;; [vshrnbq_m_n_s, vshrnbq_m_n_u])
6643;;
6644(define_insn "mve_vshrnbq_m_n_<supf><mode>"
6645  [
6646   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6647	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6648		       (match_operand:MVE_5 2 "s_register_operand" "w")
6649		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")
6650		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6651	 VSHRNBQ_M_N))
6652  ]
6653  "TARGET_HAVE_MVE"
6654  "vpst\;vshrnbt.i%#<V_sz_elem>\t%q0, %q2, %3"
6655  [(set_attr "type" "mve_move")
6656   (set_attr "length""8")])
6657
6658;;
6659;; [vshrntq_m_n_s, vshrntq_m_n_u])
6660;;
6661(define_insn "mve_vshrntq_m_n_<supf><mode>"
6662  [
6663   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6664	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6665		       (match_operand:MVE_5 2 "s_register_operand" "w")
6666		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")
6667		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6668	 VSHRNTQ_M_N))
6669  ]
6670  "TARGET_HAVE_MVE"
6671  "vpst\;vshrntt.i%#<V_sz_elem>\t%q0, %q2, %3"
6672  [(set_attr "type" "mve_move")
6673   (set_attr "length""8")])
6674
6675;;
6676;; [vmlsldavaq_p_s])
6677;;
6678(define_insn "mve_vmlsldavaq_p_s<mode>"
6679  [
6680   (set (match_operand:DI 0 "s_register_operand" "=r")
6681	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
6682		       (match_operand:MVE_5 2 "s_register_operand" "w")
6683		       (match_operand:MVE_5 3 "s_register_operand" "w")
6684		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6685	 VMLSLDAVAQ_P_S))
6686  ]
6687  "TARGET_HAVE_MVE"
6688  "vpst\;vmlsldavat.s%#<V_sz_elem>\t%Q0, %R0, %q2, %q3"
6689  [(set_attr "type" "mve_move")
6690   (set_attr "length""8")])
6691
6692;;
6693;; [vmlsldavaxq_p_s])
6694;;
6695(define_insn "mve_vmlsldavaxq_p_s<mode>"
6696  [
6697   (set (match_operand:DI 0 "s_register_operand" "=r")
6698	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
6699		       (match_operand:MVE_5 2 "s_register_operand" "w")
6700		       (match_operand:MVE_5 3 "s_register_operand" "w")
6701		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6702	 VMLSLDAVAXQ_P_S))
6703  ]
6704  "TARGET_HAVE_MVE"
6705  "vpst\;vmlsldavaxt.s%#<V_sz_elem>\t%Q0, %R0, %q2, %q3"
6706  [(set_attr "type" "mve_move")
6707   (set_attr "length""8")])
6708
6709;;
6710;; [vmullbq_poly_m_p])
6711;;
6712(define_insn "mve_vmullbq_poly_m_p<mode>"
6713  [
6714   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
6715	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
6716		       (match_operand:MVE_3 2 "s_register_operand" "w")
6717		       (match_operand:MVE_3 3 "s_register_operand" "w")
6718		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6719	 VMULLBQ_POLY_M_P))
6720  ]
6721  "TARGET_HAVE_MVE"
6722  "vpst\;vmullbt.p%#<V_sz_elem>\t%q0, %q2, %q3"
6723  [(set_attr "type" "mve_move")
6724   (set_attr "length""8")])
6725
6726;;
6727;; [vmulltq_poly_m_p])
6728;;
6729(define_insn "mve_vmulltq_poly_m_p<mode>"
6730  [
6731   (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
6732	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
6733		       (match_operand:MVE_3 2 "s_register_operand" "w")
6734		       (match_operand:MVE_3 3 "s_register_operand" "w")
6735		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6736	 VMULLTQ_POLY_M_P))
6737  ]
6738  "TARGET_HAVE_MVE"
6739  "vpst\;vmulltt.p%#<V_sz_elem>\t%q0, %q2, %q3"
6740  [(set_attr "type" "mve_move")
6741   (set_attr "length""8")])
6742
6743;;
6744;; [vqdmullbq_m_n_s])
6745;;
6746(define_insn "mve_vqdmullbq_m_n_s<mode>"
6747  [
6748   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
6749	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
6750		       (match_operand:MVE_5 2 "s_register_operand" "w")
6751		       (match_operand:<V_elem> 3 "s_register_operand" "r")
6752		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6753	 VQDMULLBQ_M_N_S))
6754  ]
6755  "TARGET_HAVE_MVE"
6756  "vpst\;vqdmullbt.s%#<V_sz_elem>\t%q0, %q2, %3"
6757  [(set_attr "type" "mve_move")
6758   (set_attr "length""8")])
6759
6760;;
6761;; [vqdmullbq_m_s])
6762;;
6763(define_insn "mve_vqdmullbq_m_s<mode>"
6764  [
6765   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
6766	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
6767		       (match_operand:MVE_5 2 "s_register_operand" "w")
6768		       (match_operand:MVE_5 3 "s_register_operand" "w")
6769		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6770	 VQDMULLBQ_M_S))
6771  ]
6772  "TARGET_HAVE_MVE"
6773  "vpst\;vqdmullbt.s%#<V_sz_elem>\t%q0, %q2, %q3"
6774  [(set_attr "type" "mve_move")
6775   (set_attr "length""8")])
6776
6777;;
6778;; [vqdmulltq_m_n_s])
6779;;
6780(define_insn "mve_vqdmulltq_m_n_s<mode>"
6781  [
6782   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
6783	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
6784		       (match_operand:MVE_5 2 "s_register_operand" "w")
6785		       (match_operand:<V_elem> 3 "s_register_operand" "r")
6786		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6787	 VQDMULLTQ_M_N_S))
6788  ]
6789  "TARGET_HAVE_MVE"
6790  "vpst\;vqdmulltt.s%#<V_sz_elem>\t%q0, %q2, %3"
6791  [(set_attr "type" "mve_move")
6792   (set_attr "length""8")])
6793
6794;;
6795;; [vqdmulltq_m_s])
6796;;
6797(define_insn "mve_vqdmulltq_m_s<mode>"
6798  [
6799   (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
6800	(unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
6801		       (match_operand:MVE_5 2 "s_register_operand" "w")
6802		       (match_operand:MVE_5 3 "s_register_operand" "w")
6803		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6804	 VQDMULLTQ_M_S))
6805  ]
6806  "TARGET_HAVE_MVE"
6807  "vpst\;vqdmulltt.s%#<V_sz_elem>\t%q0, %q2, %q3"
6808  [(set_attr "type" "mve_move")
6809   (set_attr "length""8")])
6810
6811;;
6812;; [vqrshrunbq_m_n_s])
6813;;
6814(define_insn "mve_vqrshrunbq_m_n_s<mode>"
6815  [
6816   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6817	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6818		       (match_operand:MVE_5 2 "s_register_operand" "w")
6819		       (match_operand:SI 3 "mve_imm_8" "Rb")
6820		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6821	 VQRSHRUNBQ_M_N_S))
6822  ]
6823  "TARGET_HAVE_MVE"
6824  "vpst\;vqrshrunbt.s%#<V_sz_elem>\t%q0, %q2, %3"
6825  [(set_attr "type" "mve_move")
6826   (set_attr "length""8")])
6827
6828;;
6829;; [vqrshruntq_m_n_s])
6830;;
6831(define_insn "mve_vqrshruntq_m_n_s<mode>"
6832  [
6833   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6834	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6835		       (match_operand:MVE_5 2 "s_register_operand" "w")
6836		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")
6837		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6838	 VQRSHRUNTQ_M_N_S))
6839  ]
6840  "TARGET_HAVE_MVE"
6841  "vpst\;vqrshruntt.s%#<V_sz_elem>\t%q0, %q2, %3"
6842  [(set_attr "type" "mve_move")
6843   (set_attr "length""8")])
6844
6845;;
6846;; [vqshrunbq_m_n_s])
6847;;
6848(define_insn "mve_vqshrunbq_m_n_s<mode>"
6849  [
6850   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6851	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6852		       (match_operand:MVE_5 2 "s_register_operand" "w")
6853		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")
6854		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6855	 VQSHRUNBQ_M_N_S))
6856  ]
6857  "TARGET_HAVE_MVE"
6858  "vpst\;vqshrunbt.s%#<V_sz_elem>\t%q0, %q2, %3"
6859  [(set_attr "type" "mve_move")
6860   (set_attr "length""8")])
6861
6862;;
6863;; [vqshruntq_m_n_s])
6864;;
6865(define_insn "mve_vqshruntq_m_n_s<mode>"
6866  [
6867   (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
6868	(unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
6869		       (match_operand:MVE_5 2 "s_register_operand" "w")
6870		       (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")
6871		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6872	 VQSHRUNTQ_M_N_S))
6873  ]
6874  "TARGET_HAVE_MVE"
6875  "vpst\;vqshruntt.s%#<V_sz_elem>\t%q0, %q2, %3"
6876  [(set_attr "type" "mve_move")
6877   (set_attr "length""8")])
6878
6879;;
6880;; [vrmlaldavhaq_p_u])
6881;;
6882(define_insn "mve_vrmlaldavhaq_p_uv4si"
6883  [
6884   (set (match_operand:DI 0 "s_register_operand" "=r")
6885	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
6886		       (match_operand:V4SI 2 "s_register_operand" "w")
6887		       (match_operand:V4SI 3 "s_register_operand" "w")
6888		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6889	 VRMLALDAVHAQ_P_U))
6890  ]
6891  "TARGET_HAVE_MVE"
6892  "vpst\;vrmlaldavhat.u32\t%Q0, %R0, %q2, %q3"
6893  [(set_attr "type" "mve_move")
6894   (set_attr "length""8")])
6895
6896;;
6897;; [vrmlaldavhaxq_p_s])
6898;;
6899(define_insn "mve_vrmlaldavhaxq_p_sv4si"
6900  [
6901   (set (match_operand:DI 0 "s_register_operand" "=r")
6902	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
6903		       (match_operand:V4SI 2 "s_register_operand" "w")
6904		       (match_operand:V4SI 3 "s_register_operand" "w")
6905		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6906	 VRMLALDAVHAXQ_P_S))
6907  ]
6908  "TARGET_HAVE_MVE"
6909  "vpst\;vrmlaldavhaxt.s32\t%Q0, %R0, %q2, %q3"
6910  [(set_attr "type" "mve_move")
6911   (set_attr "length""8")])
6912
6913;;
6914;; [vrmlsldavhaq_p_s])
6915;;
6916(define_insn "mve_vrmlsldavhaq_p_sv4si"
6917  [
6918   (set (match_operand:DI 0 "s_register_operand" "=r")
6919	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
6920		       (match_operand:V4SI 2 "s_register_operand" "w")
6921		       (match_operand:V4SI 3 "s_register_operand" "w")
6922		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6923	 VRMLSLDAVHAQ_P_S))
6924  ]
6925  "TARGET_HAVE_MVE"
6926  "vpst\;vrmlsldavhat.s32\t%Q0, %R0, %q2, %q3"
6927  [(set_attr "type" "mve_move")
6928   (set_attr "length""8")])
6929
6930;;
6931;; [vrmlsldavhaxq_p_s])
6932;;
6933(define_insn "mve_vrmlsldavhaxq_p_sv4si"
6934  [
6935   (set (match_operand:DI 0 "s_register_operand" "=r")
6936	(unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
6937		       (match_operand:V4SI 2 "s_register_operand" "w")
6938		       (match_operand:V4SI 3 "s_register_operand" "w")
6939		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6940	 VRMLSLDAVHAXQ_P_S))
6941  ]
6942  "TARGET_HAVE_MVE"
6943  "vpst\;vrmlsldavhaxt.s32\t%Q0, %R0, %q2, %q3"
6944  [(set_attr "type" "mve_move")
6945   (set_attr "length""8")])
6946;;
6947;; [vabdq_m_f])
6948;;
6949(define_insn "mve_vabdq_m_f<mode>"
6950  [
6951   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
6952	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
6953		       (match_operand:MVE_0 2 "s_register_operand" "w")
6954		       (match_operand:MVE_0 3 "s_register_operand" "w")
6955		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6956	 VABDQ_M_F))
6957  ]
6958  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
6959  "vpst\;vabdt.f%#<V_sz_elem>	%q0, %q2, %q3"
6960  [(set_attr "type" "mve_move")
6961   (set_attr "length""8")])
6962
6963;;
6964;; [vaddq_m_f])
6965;;
6966(define_insn "mve_vaddq_m_f<mode>"
6967  [
6968   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
6969	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
6970		       (match_operand:MVE_0 2 "s_register_operand" "w")
6971		       (match_operand:MVE_0 3 "s_register_operand" "w")
6972		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6973	 VADDQ_M_F))
6974  ]
6975  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
6976  "vpst\;vaddt.f%#<V_sz_elem>	%q0, %q2, %q3"
6977  [(set_attr "type" "mve_move")
6978   (set_attr "length""8")])
6979
6980;;
6981;; [vaddq_m_n_f])
6982;;
6983(define_insn "mve_vaddq_m_n_f<mode>"
6984  [
6985   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
6986	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
6987		       (match_operand:MVE_0 2 "s_register_operand" "w")
6988		       (match_operand:<V_elem> 3 "s_register_operand" "r")
6989		       (match_operand:HI 4 "vpr_register_operand" "Up")]
6990	 VADDQ_M_N_F))
6991  ]
6992  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
6993  "vpst\;vaddt.f%#<V_sz_elem>	%q0, %q2, %3"
6994  [(set_attr "type" "mve_move")
6995   (set_attr "length""8")])
6996
6997;;
6998;; [vandq_m_f])
6999;;
7000(define_insn "mve_vandq_m_f<mode>"
7001  [
7002   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7003	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7004		       (match_operand:MVE_0 2 "s_register_operand" "w")
7005		       (match_operand:MVE_0 3 "s_register_operand" "w")
7006		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7007	 VANDQ_M_F))
7008  ]
7009  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7010  "vpst\;vandt %q0, %q2, %q3"
7011  [(set_attr "type" "mve_move")
7012   (set_attr "length""8")])
7013
7014;;
7015;; [vbicq_m_f])
7016;;
7017(define_insn "mve_vbicq_m_f<mode>"
7018  [
7019   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7020	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7021		       (match_operand:MVE_0 2 "s_register_operand" "w")
7022		       (match_operand:MVE_0 3 "s_register_operand" "w")
7023		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7024	 VBICQ_M_F))
7025  ]
7026  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7027  "vpst\;vbict %q0, %q2, %q3"
7028  [(set_attr "type" "mve_move")
7029   (set_attr "length""8")])
7030
7031;;
7032;; [vbrsrq_m_n_f])
7033;;
7034(define_insn "mve_vbrsrq_m_n_f<mode>"
7035  [
7036   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7037	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7038		       (match_operand:MVE_0 2 "s_register_operand" "w")
7039		       (match_operand:SI 3 "s_register_operand" "r")
7040		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7041	 VBRSRQ_M_N_F))
7042  ]
7043  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7044  "vpst\;vbrsrt.%#<V_sz_elem>	%q0, %q2, %3"
7045  [(set_attr "type" "mve_move")
7046   (set_attr "length""8")])
7047
7048;;
7049;; [vcaddq_rot270_m_f])
7050;;
7051(define_insn "mve_vcaddq_rot270_m_f<mode>"
7052  [
7053   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
7054	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7055		       (match_operand:MVE_0 2 "s_register_operand" "w")
7056		       (match_operand:MVE_0 3 "s_register_operand" "w")
7057		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7058	 VCADDQ_ROT270_M_F))
7059  ]
7060  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7061  "vpst\;vcaddt.f%#<V_sz_elem>	%q0, %q2, %q3, #270"
7062  [(set_attr "type" "mve_move")
7063   (set_attr "length""8")])
7064
7065;;
7066;; [vcaddq_rot90_m_f])
7067;;
7068(define_insn "mve_vcaddq_rot90_m_f<mode>"
7069  [
7070   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
7071	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7072		       (match_operand:MVE_0 2 "s_register_operand" "w")
7073		       (match_operand:MVE_0 3 "s_register_operand" "w")
7074		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7075	 VCADDQ_ROT90_M_F))
7076  ]
7077  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7078  "vpst\;vcaddt.f%#<V_sz_elem>	%q0, %q2, %q3, #90"
7079  [(set_attr "type" "mve_move")
7080   (set_attr "length""8")])
7081
7082;;
7083;; [vcmlaq_m_f])
7084;;
7085(define_insn "mve_vcmlaq_m_f<mode>"
7086  [
7087   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7088	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7089		       (match_operand:MVE_0 2 "s_register_operand" "w")
7090		       (match_operand:MVE_0 3 "s_register_operand" "w")
7091		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7092	 VCMLAQ_M_F))
7093  ]
7094  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7095  "vpst\;vcmlat.f%#<V_sz_elem>	%q0, %q2, %q3, #0"
7096  [(set_attr "type" "mve_move")
7097   (set_attr "length""8")])
7098
7099;;
7100;; [vcmlaq_rot180_m_f])
7101;;
7102(define_insn "mve_vcmlaq_rot180_m_f<mode>"
7103  [
7104   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7105	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7106		       (match_operand:MVE_0 2 "s_register_operand" "w")
7107		       (match_operand:MVE_0 3 "s_register_operand" "w")
7108		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7109	 VCMLAQ_ROT180_M_F))
7110  ]
7111  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7112  "vpst\;vcmlat.f%#<V_sz_elem>	%q0, %q2, %q3, #180"
7113  [(set_attr "type" "mve_move")
7114   (set_attr "length""8")])
7115
7116;;
7117;; [vcmlaq_rot270_m_f])
7118;;
7119(define_insn "mve_vcmlaq_rot270_m_f<mode>"
7120  [
7121   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7122	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7123		       (match_operand:MVE_0 2 "s_register_operand" "w")
7124		       (match_operand:MVE_0 3 "s_register_operand" "w")
7125		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7126	 VCMLAQ_ROT270_M_F))
7127  ]
7128  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7129  "vpst\;vcmlat.f%#<V_sz_elem>	%q0, %q2, %q3, #270"
7130  [(set_attr "type" "mve_move")
7131   (set_attr "length""8")])
7132
7133;;
7134;; [vcmlaq_rot90_m_f])
7135;;
7136(define_insn "mve_vcmlaq_rot90_m_f<mode>"
7137  [
7138   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7139	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7140		       (match_operand:MVE_0 2 "s_register_operand" "w")
7141		       (match_operand:MVE_0 3 "s_register_operand" "w")
7142		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7143	 VCMLAQ_ROT90_M_F))
7144  ]
7145  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7146  "vpst\;vcmlat.f%#<V_sz_elem>	%q0, %q2, %q3, #90"
7147  [(set_attr "type" "mve_move")
7148   (set_attr "length""8")])
7149
7150;;
7151;; [vcmulq_m_f])
7152;;
7153(define_insn "mve_vcmulq_m_f<mode>"
7154  [
7155   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
7156	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7157		       (match_operand:MVE_0 2 "s_register_operand" "w")
7158		       (match_operand:MVE_0 3 "s_register_operand" "w")
7159		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7160	 VCMULQ_M_F))
7161  ]
7162  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7163  "vpst\;vcmult.f%#<V_sz_elem>	%q0, %q2, %q3, #0"
7164  [(set_attr "type" "mve_move")
7165   (set_attr "length""8")])
7166
7167;;
7168;; [vcmulq_rot180_m_f])
7169;;
7170(define_insn "mve_vcmulq_rot180_m_f<mode>"
7171  [
7172   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
7173	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7174		       (match_operand:MVE_0 2 "s_register_operand" "w")
7175		       (match_operand:MVE_0 3 "s_register_operand" "w")
7176		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7177	 VCMULQ_ROT180_M_F))
7178  ]
7179  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7180  "vpst\;vcmult.f%#<V_sz_elem>	%q0, %q2, %q3, #180"
7181  [(set_attr "type" "mve_move")
7182   (set_attr "length""8")])
7183
7184;;
7185;; [vcmulq_rot270_m_f])
7186;;
7187(define_insn "mve_vcmulq_rot270_m_f<mode>"
7188  [
7189   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
7190	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7191		       (match_operand:MVE_0 2 "s_register_operand" "w")
7192		       (match_operand:MVE_0 3 "s_register_operand" "w")
7193		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7194	 VCMULQ_ROT270_M_F))
7195  ]
7196  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7197  "vpst\;vcmult.f%#<V_sz_elem>	%q0, %q2, %q3, #270"
7198  [(set_attr "type" "mve_move")
7199   (set_attr "length""8")])
7200
7201;;
7202;; [vcmulq_rot90_m_f])
7203;;
7204(define_insn "mve_vcmulq_rot90_m_f<mode>"
7205  [
7206   (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
7207	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7208		       (match_operand:MVE_0 2 "s_register_operand" "w")
7209		       (match_operand:MVE_0 3 "s_register_operand" "w")
7210		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7211	 VCMULQ_ROT90_M_F))
7212  ]
7213  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7214  "vpst\;vcmult.f%#<V_sz_elem>	%q0, %q2, %q3, #90"
7215  [(set_attr "type" "mve_move")
7216   (set_attr "length""8")])
7217
7218;;
7219;; [veorq_m_f])
7220;;
7221(define_insn "mve_veorq_m_f<mode>"
7222  [
7223   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7224	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7225		       (match_operand:MVE_0 2 "s_register_operand" "w")
7226		       (match_operand:MVE_0 3 "s_register_operand" "w")
7227		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7228	 VEORQ_M_F))
7229  ]
7230  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7231  "vpst\;veort %q0, %q2, %q3"
7232  [(set_attr "type" "mve_move")
7233   (set_attr "length""8")])
7234
7235;;
7236;; [vfmaq_m_f])
7237;;
7238(define_insn "mve_vfmaq_m_f<mode>"
7239  [
7240   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7241	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7242		       (match_operand:MVE_0 2 "s_register_operand" "w")
7243		       (match_operand:MVE_0 3 "s_register_operand" "w")
7244		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7245	 VFMAQ_M_F))
7246  ]
7247  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7248  "vpst\;vfmat.f%#<V_sz_elem>	%q0, %q2, %q3"
7249  [(set_attr "type" "mve_move")
7250   (set_attr "length""8")])
7251
7252;;
7253;; [vfmaq_m_n_f])
7254;;
7255(define_insn "mve_vfmaq_m_n_f<mode>"
7256  [
7257   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7258	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7259		       (match_operand:MVE_0 2 "s_register_operand" "w")
7260		       (match_operand:<V_elem> 3 "s_register_operand" "r")
7261		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7262	 VFMAQ_M_N_F))
7263  ]
7264  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7265  "vpst\;vfmat.f%#<V_sz_elem>	%q0, %q2, %3"
7266  [(set_attr "type" "mve_move")
7267   (set_attr "length""8")])
7268
7269;;
7270;; [vfmasq_m_n_f])
7271;;
7272(define_insn "mve_vfmasq_m_n_f<mode>"
7273  [
7274   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7275	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7276		       (match_operand:MVE_0 2 "s_register_operand" "w")
7277		       (match_operand:<V_elem> 3 "s_register_operand" "r")
7278		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7279	 VFMASQ_M_N_F))
7280  ]
7281  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7282  "vpst\;vfmast.f%#<V_sz_elem>	%q0, %q2, %3"
7283  [(set_attr "type" "mve_move")
7284   (set_attr "length""8")])
7285
7286;;
7287;; [vfmsq_m_f])
7288;;
7289(define_insn "mve_vfmsq_m_f<mode>"
7290  [
7291   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7292	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7293		       (match_operand:MVE_0 2 "s_register_operand" "w")
7294		       (match_operand:MVE_0 3 "s_register_operand" "w")
7295		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7296	 VFMSQ_M_F))
7297  ]
7298  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7299  "vpst\;vfmst.f%#<V_sz_elem>	%q0, %q2, %q3"
7300  [(set_attr "type" "mve_move")
7301   (set_attr "length""8")])
7302
7303;;
7304;; [vmaxnmq_m_f])
7305;;
7306(define_insn "mve_vmaxnmq_m_f<mode>"
7307  [
7308   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7309	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7310		       (match_operand:MVE_0 2 "s_register_operand" "w")
7311		       (match_operand:MVE_0 3 "s_register_operand" "w")
7312		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7313	 VMAXNMQ_M_F))
7314  ]
7315  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7316  "vpst\;vmaxnmt.f%#<V_sz_elem>	%q0, %q2, %q3"
7317  [(set_attr "type" "mve_move")
7318   (set_attr "length""8")])
7319
7320;;
7321;; [vminnmq_m_f])
7322;;
7323(define_insn "mve_vminnmq_m_f<mode>"
7324  [
7325   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7326	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7327		       (match_operand:MVE_0 2 "s_register_operand" "w")
7328		       (match_operand:MVE_0 3 "s_register_operand" "w")
7329		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7330	 VMINNMQ_M_F))
7331  ]
7332  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7333  "vpst\;vminnmt.f%#<V_sz_elem>	%q0, %q2, %q3"
7334  [(set_attr "type" "mve_move")
7335   (set_attr "length""8")])
7336
7337;;
7338;; [vmulq_m_f])
7339;;
7340(define_insn "mve_vmulq_m_f<mode>"
7341  [
7342   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7343	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7344		       (match_operand:MVE_0 2 "s_register_operand" "w")
7345		       (match_operand:MVE_0 3 "s_register_operand" "w")
7346		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7347	 VMULQ_M_F))
7348  ]
7349  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7350  "vpst\;vmult.f%#<V_sz_elem>	%q0, %q2, %q3"
7351  [(set_attr "type" "mve_move")
7352   (set_attr "length""8")])
7353
7354;;
7355;; [vmulq_m_n_f])
7356;;
7357(define_insn "mve_vmulq_m_n_f<mode>"
7358  [
7359   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7360	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7361		       (match_operand:MVE_0 2 "s_register_operand" "w")
7362		       (match_operand:<V_elem> 3 "s_register_operand" "r")
7363		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7364	 VMULQ_M_N_F))
7365  ]
7366  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7367  "vpst\;vmult.f%#<V_sz_elem>	%q0, %q2, %3"
7368  [(set_attr "type" "mve_move")
7369   (set_attr "length""8")])
7370
7371;;
7372;; [vornq_m_f])
7373;;
7374(define_insn "mve_vornq_m_f<mode>"
7375  [
7376   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7377	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7378		       (match_operand:MVE_0 2 "s_register_operand" "w")
7379		       (match_operand:MVE_0 3 "s_register_operand" "w")
7380		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7381	 VORNQ_M_F))
7382  ]
7383  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7384  "vpst\;vornt %q0, %q2, %q3"
7385  [(set_attr "type" "mve_move")
7386   (set_attr "length""8")])
7387
7388;;
7389;; [vorrq_m_f])
7390;;
7391(define_insn "mve_vorrq_m_f<mode>"
7392  [
7393   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7394	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7395		       (match_operand:MVE_0 2 "s_register_operand" "w")
7396		       (match_operand:MVE_0 3 "s_register_operand" "w")
7397		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7398	 VORRQ_M_F))
7399  ]
7400  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7401  "vpst\;vorrt %q0, %q2, %q3"
7402  [(set_attr "type" "mve_move")
7403   (set_attr "length""8")])
7404
7405;;
7406;; [vsubq_m_f])
7407;;
7408(define_insn "mve_vsubq_m_f<mode>"
7409  [
7410   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7411	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7412		       (match_operand:MVE_0 2 "s_register_operand" "w")
7413		       (match_operand:MVE_0 3 "s_register_operand" "w")
7414		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7415	 VSUBQ_M_F))
7416  ]
7417  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7418  "vpst\;vsubt.f%#<V_sz_elem>\t%q0, %q2, %q3"
7419  [(set_attr "type" "mve_move")
7420   (set_attr "length""8")])
7421
7422;;
7423;; [vsubq_m_n_f])
7424;;
7425(define_insn "mve_vsubq_m_n_f<mode>"
7426  [
7427   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
7428	(unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
7429		       (match_operand:MVE_0 2 "s_register_operand" "w")
7430		       (match_operand:<V_elem> 3 "s_register_operand" "r")
7431		       (match_operand:HI 4 "vpr_register_operand" "Up")]
7432	 VSUBQ_M_N_F))
7433  ]
7434  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7435  "vpst\;vsubt.f%#<V_sz_elem>\t%q0, %q2, %3"
7436  [(set_attr "type" "mve_move")
7437   (set_attr "length""8")])
7438
7439;;
7440;; [vstrbq_s vstrbq_u]
7441;;
7442(define_insn "mve_vstrbq_<supf><mode>"
7443  [(set (match_operand:<MVE_B_ELEM> 0 "mve_memory_operand" "=Ux")
7444	(unspec:<MVE_B_ELEM> [(match_operand:MVE_2 1 "s_register_operand" "w")]
7445	 VSTRBQ))
7446  ]
7447  "TARGET_HAVE_MVE"
7448{
7449   rtx ops[2];
7450   int regno = REGNO (operands[1]);
7451   ops[1] = gen_rtx_REG (TImode, regno);
7452   ops[0]  = operands[0];
7453   output_asm_insn("vstrb.<V_sz_elem>\t%q1, %E0",ops);
7454   return "";
7455}
7456  [(set_attr "length" "4")])
7457
7458;;
7459;; [vstrbq_scatter_offset_s vstrbq_scatter_offset_u]
7460;;
7461(define_expand "mve_vstrbq_scatter_offset_<supf><mode>"
7462  [(match_operand:<MVE_B_ELEM> 0 "mve_scatter_memory")
7463   (match_operand:MVE_2 1 "s_register_operand")
7464   (match_operand:MVE_2 2 "s_register_operand")
7465   (unspec:V4SI [(const_int 0)] VSTRBSOQ)]
7466  "TARGET_HAVE_MVE"
7467{
7468  rtx ind = XEXP (operands[0], 0);
7469  gcc_assert (REG_P (ind));
7470  emit_insn (gen_mve_vstrbq_scatter_offset_<supf><mode>_insn (ind, operands[1],
7471							      operands[2]));
7472  DONE;
7473})
7474
7475(define_insn "mve_vstrbq_scatter_offset_<supf><mode>_insn"
7476  [(set (mem:BLK (scratch))
7477	(unspec:BLK
7478	  [(match_operand:SI 0 "register_operand" "r")
7479	   (match_operand:MVE_2 1 "s_register_operand" "w")
7480	   (match_operand:MVE_2 2 "s_register_operand" "w")]
7481	  VSTRBSOQ))]
7482  "TARGET_HAVE_MVE"
7483  "vstrb.<V_sz_elem>\t%q2, [%0, %q1]"
7484  [(set_attr "length" "4")])
7485
7486;;
7487;; [vstrwq_scatter_base_s vstrwq_scatter_base_u]
7488;;
7489(define_insn "mve_vstrwq_scatter_base_<supf>v4si"
7490  [(set (mem:BLK (scratch))
7491	(unspec:BLK
7492		[(match_operand:V4SI 0 "s_register_operand" "w")
7493		 (match_operand:SI 1 "immediate_operand" "i")
7494		 (match_operand:V4SI 2 "s_register_operand" "w")]
7495	 VSTRWSBQ))
7496  ]
7497  "TARGET_HAVE_MVE"
7498{
7499   rtx ops[3];
7500   ops[0] = operands[0];
7501   ops[1] = operands[1];
7502   ops[2] = operands[2];
7503   output_asm_insn("vstrw.u32\t%q2, [%q0, %1]",ops);
7504   return "";
7505}
7506  [(set_attr "length" "4")])
7507
7508;;
7509;; [vldrbq_gather_offset_s vldrbq_gather_offset_u]
7510;;
7511(define_insn "mve_vldrbq_gather_offset_<supf><mode>"
7512  [(set (match_operand:MVE_2 0 "s_register_operand" "=&w")
7513	(unspec:MVE_2 [(match_operand:<MVE_B_ELEM> 1 "memory_operand" "Us")
7514		       (match_operand:MVE_2 2 "s_register_operand" "w")]
7515	 VLDRBGOQ))
7516  ]
7517  "TARGET_HAVE_MVE"
7518{
7519   rtx ops[3];
7520   ops[0] = operands[0];
7521   ops[1] = operands[1];
7522   ops[2] = operands[2];
7523   if (!strcmp ("<supf>","s") && <V_sz_elem> == 8)
7524     output_asm_insn ("vldrb.u8\t%q0, [%m1, %q2]",ops);
7525   else
7526     output_asm_insn ("vldrb.<supf><V_sz_elem>\t%q0, [%m1, %q2]",ops);
7527   return "";
7528}
7529  [(set_attr "length" "4")])
7530
7531;;
7532;; [vldrbq_s vldrbq_u]
7533;;
7534(define_insn "mve_vldrbq_<supf><mode>"
7535  [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
7536	(unspec:MVE_2 [(match_operand:<MVE_B_ELEM> 1 "mve_memory_operand" "Ux")]
7537	 VLDRBQ))
7538  ]
7539  "TARGET_HAVE_MVE"
7540{
7541   rtx ops[2];
7542   int regno = REGNO (operands[0]);
7543   ops[0] = gen_rtx_REG (TImode, regno);
7544   ops[1]  = operands[1];
7545   if (<V_sz_elem> == 8)
7546     output_asm_insn ("vldrb.<V_sz_elem>\t%q0, %E1",ops);
7547   else
7548     output_asm_insn ("vldrb.<supf><V_sz_elem>\t%q0, %E1",ops);
7549   return "";
7550}
7551  [(set_attr "length" "4")])
7552
7553;;
7554;; [vldrwq_gather_base_s vldrwq_gather_base_u]
7555;;
7556(define_insn "mve_vldrwq_gather_base_<supf>v4si"
7557  [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
7558	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
7559		      (match_operand:SI 2 "immediate_operand" "i")]
7560	 VLDRWGBQ))
7561  ]
7562  "TARGET_HAVE_MVE"
7563{
7564   rtx ops[3];
7565   ops[0] = operands[0];
7566   ops[1] = operands[1];
7567   ops[2] = operands[2];
7568   output_asm_insn ("vldrw.u32\t%q0, [%q1, %2]",ops);
7569   return "";
7570}
7571  [(set_attr "length" "4")])
7572
7573;;
7574;; [vstrbq_scatter_offset_p_s vstrbq_scatter_offset_p_u]
7575;;
7576(define_expand "mve_vstrbq_scatter_offset_p_<supf><mode>"
7577  [(match_operand:<MVE_B_ELEM>  0 "mve_scatter_memory")
7578   (match_operand:MVE_2 1 "s_register_operand")
7579   (match_operand:MVE_2 2 "s_register_operand")
7580   (match_operand:HI 3 "vpr_register_operand" "Up")
7581   (unspec:V4SI [(const_int 0)] VSTRBSOQ)]
7582  "TARGET_HAVE_MVE"
7583{
7584  rtx ind = XEXP (operands[0], 0);
7585  gcc_assert (REG_P (ind));
7586  emit_insn (
7587    gen_mve_vstrbq_scatter_offset_p_<supf><mode>_insn (ind, operands[1],
7588						       operands[2],
7589						       operands[3]));
7590  DONE;
7591})
7592
7593(define_insn "mve_vstrbq_scatter_offset_p_<supf><mode>_insn"
7594  [(set (mem:BLK (scratch))
7595	(unspec:BLK
7596	  [(match_operand:SI 0 "register_operand" "r")
7597	   (match_operand:MVE_2 1 "s_register_operand" "w")
7598	   (match_operand:MVE_2 2 "s_register_operand" "w")
7599	   (match_operand:HI 3 "vpr_register_operand" "Up")]
7600	  VSTRBSOQ))]
7601  "TARGET_HAVE_MVE"
7602  "vpst\;vstrbt.<V_sz_elem>\t%q2, [%0, %q1]"
7603  [(set_attr "length" "8")])
7604
7605;;
7606;; [vstrwq_scatter_base_p_s vstrwq_scatter_base_p_u]
7607;;
7608(define_insn "mve_vstrwq_scatter_base_p_<supf>v4si"
7609  [(set (mem:BLK (scratch))
7610	(unspec:BLK
7611		[(match_operand:V4SI 0 "s_register_operand" "w")
7612		 (match_operand:SI 1 "immediate_operand" "i")
7613		 (match_operand:V4SI 2 "s_register_operand" "w")
7614		 (match_operand:HI 3 "vpr_register_operand" "Up")]
7615	 VSTRWSBQ))
7616  ]
7617  "TARGET_HAVE_MVE"
7618{
7619   rtx ops[3];
7620   ops[0] = operands[0];
7621   ops[1] = operands[1];
7622   ops[2] = operands[2];
7623   output_asm_insn ("vpst\n\tvstrwt.u32\t%q2, [%q0, %1]",ops);
7624   return "";
7625}
7626  [(set_attr "length" "8")])
7627
7628;;
7629;; [vstrbq_p_s vstrbq_p_u]
7630;;
7631(define_insn "mve_vstrbq_p_<supf><mode>"
7632  [(set (match_operand:<MVE_B_ELEM> 0 "mve_memory_operand" "=Ux")
7633	(unspec:<MVE_B_ELEM> [(match_operand:MVE_2 1 "s_register_operand" "w")
7634			      (match_operand:HI 2 "vpr_register_operand" "Up")]
7635	 VSTRBQ))
7636  ]
7637  "TARGET_HAVE_MVE"
7638{
7639   rtx ops[2];
7640   int regno = REGNO (operands[1]);
7641   ops[1] = gen_rtx_REG (TImode, regno);
7642   ops[0]  = operands[0];
7643   output_asm_insn ("vpst\;vstrbt.<V_sz_elem>\t%q1, %E0",ops);
7644   return "";
7645}
7646  [(set_attr "length" "8")])
7647
7648;;
7649;; [vldrbq_gather_offset_z_s vldrbq_gather_offset_z_u]
7650;;
7651(define_insn "mve_vldrbq_gather_offset_z_<supf><mode>"
7652  [(set (match_operand:MVE_2 0 "s_register_operand" "=&w")
7653	(unspec:MVE_2 [(match_operand:<MVE_B_ELEM> 1 "memory_operand" "Us")
7654		       (match_operand:MVE_2 2 "s_register_operand" "w")
7655		       (match_operand:HI 3 "vpr_register_operand" "Up")]
7656	 VLDRBGOQ))
7657  ]
7658  "TARGET_HAVE_MVE"
7659{
7660   rtx ops[4];
7661   ops[0] = operands[0];
7662   ops[1] = operands[1];
7663   ops[2] = operands[2];
7664   ops[3] = operands[3];
7665   if (!strcmp ("<supf>","s") && <V_sz_elem> == 8)
7666     output_asm_insn ("vpst\n\tvldrbt.u8\t%q0, [%m1, %q2]",ops);
7667   else
7668     output_asm_insn ("vpst\n\tvldrbt.<supf><V_sz_elem>\t%q0, [%m1, %q2]",ops);
7669   return "";
7670}
7671  [(set_attr "length" "8")])
7672
7673;;
7674;; [vldrbq_z_s vldrbq_z_u]
7675;;
7676(define_insn "mve_vldrbq_z_<supf><mode>"
7677  [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
7678	(unspec:MVE_2 [(match_operand:<MVE_B_ELEM> 1 "mve_memory_operand" "Ux")
7679		       (match_operand:HI 2 "vpr_register_operand" "Up")]
7680	 VLDRBQ))
7681  ]
7682  "TARGET_HAVE_MVE"
7683{
7684   rtx ops[2];
7685   int regno = REGNO (operands[0]);
7686   ops[0] = gen_rtx_REG (TImode, regno);
7687   ops[1]  = operands[1];
7688   if (<V_sz_elem> == 8)
7689     output_asm_insn ("vpst\;vldrbt.<V_sz_elem>\t%q0, %E1",ops);
7690   else
7691     output_asm_insn ("vpst\;vldrbt.<supf><V_sz_elem>\t%q0, %E1",ops);
7692   return "";
7693}
7694  [(set_attr "length" "8")])
7695
7696;;
7697;; [vldrwq_gather_base_z_s vldrwq_gather_base_z_u]
7698;;
7699(define_insn "mve_vldrwq_gather_base_z_<supf>v4si"
7700  [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
7701	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
7702		      (match_operand:SI 2 "immediate_operand" "i")
7703		      (match_operand:HI 3 "vpr_register_operand" "Up")]
7704	 VLDRWGBQ))
7705  ]
7706  "TARGET_HAVE_MVE"
7707{
7708   rtx ops[3];
7709   ops[0] = operands[0];
7710   ops[1] = operands[1];
7711   ops[2] = operands[2];
7712   output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%q1, %2]",ops);
7713   return "";
7714}
7715  [(set_attr "length" "8")])
7716
7717;;
7718;; [vldrhq_f]
7719;;
7720(define_insn "mve_vldrhq_fv8hf"
7721  [(set (match_operand:V8HF 0 "s_register_operand" "=w")
7722	(unspec:V8HF [(match_operand:V8HI 1 "mve_memory_operand" "Ux")]
7723	 VLDRHQ_F))
7724  ]
7725  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7726{
7727   rtx ops[2];
7728   int regno = REGNO (operands[0]);
7729   ops[0] = gen_rtx_REG (TImode, regno);
7730   ops[1]  = operands[1];
7731   output_asm_insn ("vldrh.16\t%q0, %E1",ops);
7732   return "";
7733}
7734  [(set_attr "length" "4")])
7735
7736;;
7737;; [vldrhq_gather_offset_s vldrhq_gather_offset_u]
7738;;
7739(define_insn "mve_vldrhq_gather_offset_<supf><mode>"
7740  [(set (match_operand:MVE_6 0 "s_register_operand" "=&w")
7741	(unspec:MVE_6 [(match_operand:<MVE_H_ELEM> 1 "memory_operand" "Us")
7742		       (match_operand:MVE_6 2 "s_register_operand" "w")]
7743	VLDRHGOQ))
7744  ]
7745  "TARGET_HAVE_MVE"
7746{
7747   rtx ops[3];
7748   ops[0] = operands[0];
7749   ops[1] = operands[1];
7750   ops[2] = operands[2];
7751   if (!strcmp ("<supf>","s") && <V_sz_elem> == 16)
7752     output_asm_insn ("vldrh.u16\t%q0, [%m1, %q2]",ops);
7753   else
7754     output_asm_insn ("vldrh.<supf><V_sz_elem>\t%q0, [%m1, %q2]",ops);
7755   return "";
7756}
7757  [(set_attr "length" "4")])
7758
7759;;
7760;; [vldrhq_gather_offset_z_s vldrhq_gather_offset_z_u]
7761;;
7762(define_insn "mve_vldrhq_gather_offset_z_<supf><mode>"
7763  [(set (match_operand:MVE_6 0 "s_register_operand" "=&w")
7764	(unspec:MVE_6 [(match_operand:<MVE_H_ELEM> 1 "memory_operand" "Us")
7765		       (match_operand:MVE_6 2 "s_register_operand" "w")
7766		       (match_operand:HI 3 "vpr_register_operand" "Up")
7767	]VLDRHGOQ))
7768  ]
7769  "TARGET_HAVE_MVE"
7770{
7771   rtx ops[4];
7772   ops[0] = operands[0];
7773   ops[1] = operands[1];
7774   ops[2] = operands[2];
7775   ops[3] = operands[3];
7776   if (!strcmp ("<supf>","s") && <V_sz_elem> == 16)
7777     output_asm_insn ("vpst\n\tvldrht.u16\t%q0, [%m1, %q2]",ops);
7778   else
7779     output_asm_insn ("vpst\n\tvldrht.<supf><V_sz_elem>\t%q0, [%m1, %q2]",ops);
7780   return "";
7781}
7782 [(set_attr "length" "8")])
7783
7784;;
7785;; [vldrhq_gather_shifted_offset_s vldrhq_gather_shifted_offset_u]
7786;;
7787(define_insn "mve_vldrhq_gather_shifted_offset_<supf><mode>"
7788  [(set (match_operand:MVE_6 0 "s_register_operand" "=&w")
7789	(unspec:MVE_6 [(match_operand:<MVE_H_ELEM> 1 "memory_operand" "Us")
7790		       (match_operand:MVE_6 2 "s_register_operand" "w")]
7791	VLDRHGSOQ))
7792  ]
7793  "TARGET_HAVE_MVE"
7794{
7795   rtx ops[3];
7796   ops[0] = operands[0];
7797   ops[1] = operands[1];
7798   ops[2] = operands[2];
7799      if (!strcmp ("<supf>","s") && <V_sz_elem> == 16)
7800     output_asm_insn ("vldrh.u16\t%q0, [%m1, %q2, uxtw #1]",ops);
7801   else
7802     output_asm_insn ("vldrh.<supf><V_sz_elem>\t%q0, [%m1, %q2, uxtw #1]",ops);
7803   return "";
7804}
7805  [(set_attr "length" "4")])
7806
7807;;
7808;; [vldrhq_gather_shifted_offset_z_s vldrhq_gather_shited_offset_z_u]
7809;;
7810(define_insn "mve_vldrhq_gather_shifted_offset_z_<supf><mode>"
7811  [(set (match_operand:MVE_6 0 "s_register_operand" "=&w")
7812	(unspec:MVE_6 [(match_operand:<MVE_H_ELEM> 1 "memory_operand" "Us")
7813		       (match_operand:MVE_6 2 "s_register_operand" "w")
7814		       (match_operand:HI 3 "vpr_register_operand" "Up")
7815	]VLDRHGSOQ))
7816  ]
7817  "TARGET_HAVE_MVE"
7818{
7819   rtx ops[4];
7820   ops[0] = operands[0];
7821   ops[1] = operands[1];
7822   ops[2] = operands[2];
7823   ops[3] = operands[3];
7824   if (!strcmp ("<supf>","s") && <V_sz_elem> == 16)
7825     output_asm_insn ("vpst\n\tvldrht.u16\t%q0, [%m1, %q2, uxtw #1]",ops);
7826   else
7827     output_asm_insn ("vpst\n\tvldrht.<supf><V_sz_elem>\t%q0, [%m1, %q2, uxtw #1]",ops);
7828   return "";
7829}
7830  [(set_attr "length" "8")])
7831
7832;;
7833;; [vldrhq_s, vldrhq_u]
7834;;
7835(define_insn "mve_vldrhq_<supf><mode>"
7836  [(set (match_operand:MVE_6 0 "s_register_operand" "=w")
7837	(unspec:MVE_6 [(match_operand:<MVE_H_ELEM> 1 "mve_memory_operand" "Ux")]
7838	 VLDRHQ))
7839  ]
7840  "TARGET_HAVE_MVE"
7841{
7842   rtx ops[2];
7843   int regno = REGNO (operands[0]);
7844   ops[0] = gen_rtx_REG (TImode, regno);
7845   ops[1]  = operands[1];
7846   if (<V_sz_elem> == 16)
7847     output_asm_insn ("vldrh.16\t%q0, %E1",ops);
7848   else
7849     output_asm_insn ("vldrh.<supf><V_sz_elem>\t%q0, %E1",ops);
7850   return "";
7851}
7852  [(set_attr "length" "4")])
7853
7854;;
7855;; [vldrhq_z_f]
7856;;
7857(define_insn "mve_vldrhq_z_fv8hf"
7858  [(set (match_operand:V8HF 0 "s_register_operand" "=w")
7859	(unspec:V8HF [(match_operand:V8HI 1 "mve_memory_operand" "Ux")
7860	(match_operand:HI 2 "vpr_register_operand" "Up")]
7861	 VLDRHQ_F))
7862  ]
7863  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7864{
7865   rtx ops[2];
7866   int regno = REGNO (operands[0]);
7867   ops[0] = gen_rtx_REG (TImode, regno);
7868   ops[1]  = operands[1];
7869   output_asm_insn ("vpst\;vldrht.16\t%q0, %E1",ops);
7870   return "";
7871}
7872  [(set_attr "length" "8")])
7873
7874;;
7875;; [vldrhq_z_s vldrhq_z_u]
7876;;
7877(define_insn "mve_vldrhq_z_<supf><mode>"
7878  [(set (match_operand:MVE_6 0 "s_register_operand" "=w")
7879	(unspec:MVE_6 [(match_operand:<MVE_H_ELEM> 1 "mve_memory_operand" "Ux")
7880	(match_operand:HI 2 "vpr_register_operand" "Up")]
7881	 VLDRHQ))
7882  ]
7883  "TARGET_HAVE_MVE"
7884{
7885   rtx ops[2];
7886   int regno = REGNO (operands[0]);
7887   ops[0] = gen_rtx_REG (TImode, regno);
7888   ops[1]  = operands[1];
7889   if (<V_sz_elem> == 16)
7890     output_asm_insn ("vpst\;vldrht.16\t%q0, %E1",ops);
7891   else
7892     output_asm_insn ("vpst\;vldrht.<supf><V_sz_elem>\t%q0, %E1",ops);
7893   return "";
7894}
7895  [(set_attr "length" "8")])
7896
7897;;
7898;; [vldrwq_f]
7899;;
7900(define_insn "mve_vldrwq_fv4sf"
7901  [(set (match_operand:V4SF 0 "s_register_operand" "=w")
7902	(unspec:V4SF [(match_operand:V4SI 1 "memory_operand" "Ux")]
7903	 VLDRWQ_F))
7904  ]
7905  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7906{
7907   rtx ops[2];
7908   int regno = REGNO (operands[0]);
7909   ops[0] = gen_rtx_REG (TImode, regno);
7910   ops[1]  = operands[1];
7911   output_asm_insn ("vldrw.32\t%q0, %E1",ops);
7912   return "";
7913}
7914  [(set_attr "length" "4")])
7915
7916;;
7917;; [vldrwq_s vldrwq_u]
7918;;
7919(define_insn "mve_vldrwq_<supf>v4si"
7920  [(set (match_operand:V4SI 0 "s_register_operand" "=w")
7921	(unspec:V4SI [(match_operand:V4SI 1 "memory_operand" "Ux")]
7922	 VLDRWQ))
7923  ]
7924  "TARGET_HAVE_MVE"
7925{
7926   rtx ops[2];
7927   int regno = REGNO (operands[0]);
7928   ops[0] = gen_rtx_REG (TImode, regno);
7929   ops[1]  = operands[1];
7930   output_asm_insn ("vldrw.32\t%q0, %E1",ops);
7931   return "";
7932}
7933  [(set_attr "length" "4")])
7934
7935;;
7936;; [vldrwq_z_f]
7937;;
7938(define_insn "mve_vldrwq_z_fv4sf"
7939  [(set (match_operand:V4SF 0 "s_register_operand" "=w")
7940	(unspec:V4SF [(match_operand:V4SI 1 "memory_operand" "Ux")
7941	(match_operand:HI 2 "vpr_register_operand" "Up")]
7942	 VLDRWQ_F))
7943  ]
7944  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
7945{
7946   rtx ops[2];
7947   int regno = REGNO (operands[0]);
7948   ops[0] = gen_rtx_REG (TImode, regno);
7949   ops[1]  = operands[1];
7950   output_asm_insn ("vpst\;vldrwt.32\t%q0, %E1",ops);
7951   return "";
7952}
7953  [(set_attr "length" "8")])
7954
7955;;
7956;; [vldrwq_z_s vldrwq_z_u]
7957;;
7958(define_insn "mve_vldrwq_z_<supf>v4si"
7959  [(set (match_operand:V4SI 0 "s_register_operand" "=w")
7960	(unspec:V4SI [(match_operand:V4SI 1 "memory_operand" "Ux")
7961	(match_operand:HI 2 "vpr_register_operand" "Up")]
7962	 VLDRWQ))
7963  ]
7964  "TARGET_HAVE_MVE"
7965{
7966   rtx ops[2];
7967   int regno = REGNO (operands[0]);
7968   ops[0] = gen_rtx_REG (TImode, regno);
7969   ops[1]  = operands[1];
7970   output_asm_insn ("vpst\;vldrwt.32\t%q0, %E1",ops);
7971   return "";
7972}
7973  [(set_attr "length" "8")])
7974
7975(define_expand "mve_vld1q_f<mode>"
7976  [(match_operand:MVE_0 0 "s_register_operand")
7977   (unspec:MVE_0 [(match_operand:<MVE_CNVT> 1 "mve_memory_operand")] VLD1Q_F)
7978  ]
7979  "TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT"
7980{
7981  emit_insn (gen_mve_vldr<V_sz_elem1>q_f<mode>(operands[0],operands[1]));
7982  DONE;
7983})
7984
7985(define_expand "mve_vld1q_<supf><mode>"
7986  [(match_operand:MVE_2 0 "s_register_operand")
7987   (unspec:MVE_2 [(match_operand:MVE_2 1 "mve_memory_operand")] VLD1Q)
7988  ]
7989  "TARGET_HAVE_MVE"
7990{
7991  emit_insn (gen_mve_vldr<V_sz_elem1>q_<supf><mode>(operands[0],operands[1]));
7992  DONE;
7993})
7994
7995;;
7996;; [vldrdq_gather_base_s vldrdq_gather_base_u]
7997;;
7998(define_insn "mve_vldrdq_gather_base_<supf>v2di"
7999  [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
8000	(unspec:V2DI [(match_operand:V2DI 1 "s_register_operand" "w")
8001		      (match_operand:SI 2 "immediate_operand" "i")]
8002	 VLDRDGBQ))
8003  ]
8004  "TARGET_HAVE_MVE"
8005{
8006   rtx ops[3];
8007   ops[0] = operands[0];
8008   ops[1] = operands[1];
8009   ops[2] = operands[2];
8010   output_asm_insn ("vldrd.64\t%q0, [%q1, %2]",ops);
8011   return "";
8012}
8013  [(set_attr "length" "4")])
8014
8015;;
8016;; [vldrdq_gather_base_z_s vldrdq_gather_base_z_u]
8017;;
8018(define_insn "mve_vldrdq_gather_base_z_<supf>v2di"
8019  [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
8020	(unspec:V2DI [(match_operand:V2DI 1 "s_register_operand" "w")
8021		      (match_operand:SI 2 "immediate_operand" "i")
8022		      (match_operand:HI 3 "vpr_register_operand" "Up")]
8023	 VLDRDGBQ))
8024  ]
8025  "TARGET_HAVE_MVE"
8026{
8027   rtx ops[3];
8028   ops[0] = operands[0];
8029   ops[1] = operands[1];
8030   ops[2] = operands[2];
8031   output_asm_insn ("vpst\n\tvldrdt.u64\t%q0, [%q1, %2]",ops);
8032   return "";
8033}
8034  [(set_attr "length" "8")])
8035
8036;;
8037;; [vldrdq_gather_offset_s vldrdq_gather_offset_u]
8038;;
8039(define_insn "mve_vldrdq_gather_offset_<supf>v2di"
8040 [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
8041       (unspec:V2DI [(match_operand:V2DI 1 "memory_operand" "Us")
8042		     (match_operand:V2DI 2 "s_register_operand" "w")]
8043	VLDRDGOQ))
8044 ]
8045 "TARGET_HAVE_MVE"
8046{
8047  rtx ops[3];
8048  ops[0] = operands[0];
8049  ops[1] = operands[1];
8050  ops[2] = operands[2];
8051  output_asm_insn ("vldrd.u64\t%q0, [%m1, %q2]",ops);
8052  return "";
8053}
8054 [(set_attr "length" "4")])
8055
8056;;
8057;; [vldrdq_gather_offset_z_s vldrdq_gather_offset_z_u]
8058;;
8059(define_insn "mve_vldrdq_gather_offset_z_<supf>v2di"
8060 [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
8061       (unspec:V2DI [(match_operand:V2DI 1 "memory_operand" "Us")
8062		     (match_operand:V2DI 2 "s_register_operand" "w")
8063		     (match_operand:HI 3 "vpr_register_operand" "Up")]
8064	VLDRDGOQ))
8065 ]
8066 "TARGET_HAVE_MVE"
8067{
8068  rtx ops[3];
8069  ops[0] = operands[0];
8070  ops[1] = operands[1];
8071  ops[2] = operands[2];
8072  output_asm_insn ("vpst\n\tvldrdt.u64\t%q0, [%m1, %q2]",ops);
8073  return "";
8074}
8075 [(set_attr "length" "8")])
8076
8077;;
8078;; [vldrdq_gather_shifted_offset_s vldrdq_gather_shifted_offset_u]
8079;;
8080(define_insn "mve_vldrdq_gather_shifted_offset_<supf>v2di"
8081  [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
8082	(unspec:V2DI [(match_operand:V2DI 1 "memory_operand" "Us")
8083		      (match_operand:V2DI 2 "s_register_operand" "w")]
8084	 VLDRDGSOQ))
8085  ]
8086  "TARGET_HAVE_MVE"
8087{
8088   rtx ops[3];
8089   ops[0] = operands[0];
8090   ops[1] = operands[1];
8091   ops[2] = operands[2];
8092   output_asm_insn ("vldrd.u64\t%q0, [%m1, %q2, uxtw #3]",ops);
8093   return "";
8094}
8095  [(set_attr "length" "4")])
8096
8097;;
8098;; [vldrdq_gather_shifted_offset_z_s vldrdq_gather_shifted_offset_z_u]
8099;;
8100(define_insn "mve_vldrdq_gather_shifted_offset_z_<supf>v2di"
8101  [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
8102	(unspec:V2DI [(match_operand:V2DI 1 "memory_operand" "Us")
8103		      (match_operand:V2DI 2 "s_register_operand" "w")
8104		      (match_operand:HI 3 "vpr_register_operand" "Up")]
8105	 VLDRDGSOQ))
8106  ]
8107  "TARGET_HAVE_MVE"
8108{
8109   rtx ops[3];
8110   ops[0] = operands[0];
8111   ops[1] = operands[1];
8112   ops[2] = operands[2];
8113   output_asm_insn ("vpst\n\tvldrdt.u64\t%q0, [%m1, %q2, uxtw #3]",ops);
8114   return "";
8115}
8116  [(set_attr "length" "8")])
8117
8118;;
8119;; [vldrhq_gather_offset_f]
8120;;
8121(define_insn "mve_vldrhq_gather_offset_fv8hf"
8122  [(set (match_operand:V8HF 0 "s_register_operand" "=&w")
8123	(unspec:V8HF [(match_operand:V8HI 1 "memory_operand" "Us")
8124		      (match_operand:V8HI 2 "s_register_operand" "w")]
8125	 VLDRHQGO_F))
8126  ]
8127  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8128{
8129   rtx ops[3];
8130   ops[0] = operands[0];
8131   ops[1] = operands[1];
8132   ops[2] = operands[2];
8133   output_asm_insn ("vldrh.f16\t%q0, [%m1, %q2]",ops);
8134   return "";
8135}
8136  [(set_attr "length" "4")])
8137
8138;;
8139;; [vldrhq_gather_offset_z_f]
8140;;
8141(define_insn "mve_vldrhq_gather_offset_z_fv8hf"
8142  [(set (match_operand:V8HF 0 "s_register_operand" "=&w")
8143	(unspec:V8HF [(match_operand:V8HI 1 "memory_operand" "Us")
8144		      (match_operand:V8HI 2 "s_register_operand" "w")
8145		      (match_operand:HI 3 "vpr_register_operand" "Up")]
8146	 VLDRHQGO_F))
8147  ]
8148  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8149{
8150   rtx ops[4];
8151   ops[0] = operands[0];
8152   ops[1] = operands[1];
8153   ops[2] = operands[2];
8154   ops[3] = operands[3];
8155   output_asm_insn ("vpst\n\tvldrht.f16\t%q0, [%m1, %q2]",ops);
8156   return "";
8157}
8158  [(set_attr "length" "8")])
8159
8160;;
8161;; [vldrhq_gather_shifted_offset_f]
8162;;
8163(define_insn "mve_vldrhq_gather_shifted_offset_fv8hf"
8164  [(set (match_operand:V8HF 0 "s_register_operand" "=&w")
8165	(unspec:V8HF [(match_operand:V8HI 1 "memory_operand" "Us")
8166		      (match_operand:V8HI 2 "s_register_operand" "w")]
8167	 VLDRHQGSO_F))
8168  ]
8169  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8170{
8171   rtx ops[3];
8172   ops[0] = operands[0];
8173   ops[1] = operands[1];
8174   ops[2] = operands[2];
8175   output_asm_insn ("vldrh.f16\t%q0, [%m1, %q2, uxtw #1]",ops);
8176   return "";
8177}
8178  [(set_attr "length" "4")])
8179
8180;;
8181;; [vldrhq_gather_shifted_offset_z_f]
8182;;
8183(define_insn "mve_vldrhq_gather_shifted_offset_z_fv8hf"
8184  [(set (match_operand:V8HF 0 "s_register_operand" "=&w")
8185	(unspec:V8HF [(match_operand:V8HI 1 "memory_operand" "Us")
8186		      (match_operand:V8HI 2 "s_register_operand" "w")
8187		      (match_operand:HI 3 "vpr_register_operand" "Up")]
8188	 VLDRHQGSO_F))
8189  ]
8190  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8191{
8192   rtx ops[4];
8193   ops[0] = operands[0];
8194   ops[1] = operands[1];
8195   ops[2] = operands[2];
8196   ops[3] = operands[3];
8197   output_asm_insn ("vpst\n\tvldrht.f16\t%q0, [%m1, %q2, uxtw #1]",ops);
8198   return "";
8199}
8200  [(set_attr "length" "8")])
8201
8202;;
8203;; [vldrwq_gather_base_f]
8204;;
8205(define_insn "mve_vldrwq_gather_base_fv4sf"
8206  [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
8207	(unspec:V4SF [(match_operand:V4SI 1 "s_register_operand" "w")
8208		      (match_operand:SI 2 "immediate_operand" "i")]
8209	 VLDRWQGB_F))
8210  ]
8211  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8212{
8213   rtx ops[3];
8214   ops[0] = operands[0];
8215   ops[1] = operands[1];
8216   ops[2] = operands[2];
8217   output_asm_insn ("vldrw.u32\t%q0, [%q1, %2]",ops);
8218   return "";
8219}
8220  [(set_attr "length" "4")])
8221
8222;;
8223;; [vldrwq_gather_base_z_f]
8224;;
8225(define_insn "mve_vldrwq_gather_base_z_fv4sf"
8226  [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
8227	(unspec:V4SF [(match_operand:V4SI 1 "s_register_operand" "w")
8228		      (match_operand:SI 2 "immediate_operand" "i")
8229		      (match_operand:HI 3 "vpr_register_operand" "Up")]
8230	 VLDRWQGB_F))
8231  ]
8232  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8233{
8234   rtx ops[3];
8235   ops[0] = operands[0];
8236   ops[1] = operands[1];
8237   ops[2] = operands[2];
8238   output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%q1, %2]",ops);
8239   return "";
8240}
8241  [(set_attr "length" "8")])
8242
8243;;
8244;; [vldrwq_gather_offset_f]
8245;;
8246(define_insn "mve_vldrwq_gather_offset_fv4sf"
8247  [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
8248	(unspec:V4SF [(match_operand:V4SI 1 "memory_operand" "Us")
8249		       (match_operand:V4SI 2 "s_register_operand" "w")]
8250	 VLDRWQGO_F))
8251  ]
8252  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8253{
8254   rtx ops[3];
8255   ops[0] = operands[0];
8256   ops[1] = operands[1];
8257   ops[2] = operands[2];
8258   output_asm_insn ("vldrw.u32\t%q0, [%m1, %q2]",ops);
8259   return "";
8260}
8261  [(set_attr "length" "4")])
8262
8263;;
8264;; [vldrwq_gather_offset_s vldrwq_gather_offset_u]
8265;;
8266(define_insn "mve_vldrwq_gather_offset_<supf>v4si"
8267  [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
8268	(unspec:V4SI [(match_operand:V4SI 1 "memory_operand" "Us")
8269		       (match_operand:V4SI 2 "s_register_operand" "w")]
8270	 VLDRWGOQ))
8271  ]
8272  "TARGET_HAVE_MVE"
8273{
8274   rtx ops[3];
8275   ops[0] = operands[0];
8276   ops[1] = operands[1];
8277   ops[2] = operands[2];
8278   output_asm_insn ("vldrw.u32\t%q0, [%m1, %q2]",ops);
8279   return "";
8280}
8281  [(set_attr "length" "4")])
8282
8283;;
8284;; [vldrwq_gather_offset_z_f]
8285;;
8286(define_insn "mve_vldrwq_gather_offset_z_fv4sf"
8287  [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
8288	(unspec:V4SF [(match_operand:V4SI 1 "memory_operand" "Us")
8289		      (match_operand:V4SI 2 "s_register_operand" "w")
8290		      (match_operand:HI 3 "vpr_register_operand" "Up")]
8291	 VLDRWQGO_F))
8292  ]
8293  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8294{
8295   rtx ops[4];
8296   ops[0] = operands[0];
8297   ops[1] = operands[1];
8298   ops[2] = operands[2];
8299   ops[3] = operands[3];
8300   output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%m1, %q2]",ops);
8301   return "";
8302}
8303  [(set_attr "length" "8")])
8304
8305;;
8306;; [vldrwq_gather_offset_z_s vldrwq_gather_offset_z_u]
8307;;
8308(define_insn "mve_vldrwq_gather_offset_z_<supf>v4si"
8309  [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
8310	(unspec:V4SI [(match_operand:V4SI 1 "memory_operand" "Us")
8311		      (match_operand:V4SI 2 "s_register_operand" "w")
8312		      (match_operand:HI 3 "vpr_register_operand" "Up")]
8313	 VLDRWGOQ))
8314  ]
8315  "TARGET_HAVE_MVE"
8316{
8317   rtx ops[4];
8318   ops[0] = operands[0];
8319   ops[1] = operands[1];
8320   ops[2] = operands[2];
8321   ops[3] = operands[3];
8322   output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%m1, %q2]",ops);
8323   return "";
8324}
8325  [(set_attr "length" "8")])
8326
8327;;
8328;; [vldrwq_gather_shifted_offset_f]
8329;;
8330(define_insn "mve_vldrwq_gather_shifted_offset_fv4sf"
8331  [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
8332	(unspec:V4SF [(match_operand:V4SI 1 "memory_operand" "Us")
8333		      (match_operand:V4SI 2 "s_register_operand" "w")]
8334	 VLDRWQGSO_F))
8335  ]
8336  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8337{
8338   rtx ops[3];
8339   ops[0] = operands[0];
8340   ops[1] = operands[1];
8341   ops[2] = operands[2];
8342   output_asm_insn ("vldrw.u32\t%q0, [%m1, %q2, uxtw #2]",ops);
8343   return "";
8344}
8345  [(set_attr "length" "4")])
8346
8347;;
8348;; [vldrwq_gather_shifted_offset_s vldrwq_gather_shifted_offset_u]
8349;;
8350(define_insn "mve_vldrwq_gather_shifted_offset_<supf>v4si"
8351  [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
8352	(unspec:V4SI [(match_operand:V4SI 1 "memory_operand" "Us")
8353		      (match_operand:V4SI 2 "s_register_operand" "w")]
8354	 VLDRWGSOQ))
8355  ]
8356  "TARGET_HAVE_MVE"
8357{
8358   rtx ops[3];
8359   ops[0] = operands[0];
8360   ops[1] = operands[1];
8361   ops[2] = operands[2];
8362   output_asm_insn ("vldrw.u32\t%q0, [%m1, %q2, uxtw #2]",ops);
8363   return "";
8364}
8365  [(set_attr "length" "4")])
8366
8367;;
8368;; [vldrwq_gather_shifted_offset_z_f]
8369;;
8370(define_insn "mve_vldrwq_gather_shifted_offset_z_fv4sf"
8371  [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
8372	(unspec:V4SF [(match_operand:V4SI 1 "memory_operand" "Us")
8373		      (match_operand:V4SI 2 "s_register_operand" "w")
8374		      (match_operand:HI 3 "vpr_register_operand" "Up")]
8375	 VLDRWQGSO_F))
8376  ]
8377  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8378{
8379   rtx ops[4];
8380   ops[0] = operands[0];
8381   ops[1] = operands[1];
8382   ops[2] = operands[2];
8383   ops[3] = operands[3];
8384   output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%m1, %q2, uxtw #2]",ops);
8385   return "";
8386}
8387  [(set_attr "length" "8")])
8388
8389;;
8390;; [vldrwq_gather_shifted_offset_z_s vldrwq_gather_shifted_offset_z_u]
8391;;
8392(define_insn "mve_vldrwq_gather_shifted_offset_z_<supf>v4si"
8393  [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
8394	(unspec:V4SI [(match_operand:V4SI 1 "memory_operand" "Us")
8395		      (match_operand:V4SI 2 "s_register_operand" "w")
8396		      (match_operand:HI 3 "vpr_register_operand" "Up")]
8397	 VLDRWGSOQ))
8398  ]
8399  "TARGET_HAVE_MVE"
8400{
8401   rtx ops[4];
8402   ops[0] = operands[0];
8403   ops[1] = operands[1];
8404   ops[2] = operands[2];
8405   ops[3] = operands[3];
8406   output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%m1, %q2, uxtw #2]",ops);
8407   return "";
8408}
8409  [(set_attr "length" "8")])
8410
8411;;
8412;; [vstrhq_f]
8413;;
8414(define_insn "mve_vstrhq_fv8hf"
8415  [(set (match_operand:V8HI 0 "mve_memory_operand" "=Ux")
8416	(unspec:V8HI [(match_operand:V8HF 1 "s_register_operand" "w")]
8417	 VSTRHQ_F))
8418  ]
8419  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8420{
8421   rtx ops[2];
8422   int regno = REGNO (operands[1]);
8423   ops[1] = gen_rtx_REG (TImode, regno);
8424   ops[0]  = operands[0];
8425   output_asm_insn ("vstrh.16\t%q1, %E0",ops);
8426   return "";
8427}
8428  [(set_attr "length" "4")])
8429
8430;;
8431;; [vstrhq_p_f]
8432;;
8433(define_insn "mve_vstrhq_p_fv8hf"
8434  [(set (match_operand:V8HI 0 "mve_memory_operand" "=Ux")
8435	(unspec:V8HI [(match_operand:V8HF 1 "s_register_operand" "w")
8436		      (match_operand:HI 2 "vpr_register_operand" "Up")]
8437	 VSTRHQ_F))
8438  ]
8439  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8440{
8441   rtx ops[2];
8442   int regno = REGNO (operands[1]);
8443   ops[1] = gen_rtx_REG (TImode, regno);
8444   ops[0]  = operands[0];
8445   output_asm_insn ("vpst\;vstrht.16\t%q1, %E0",ops);
8446   return "";
8447}
8448  [(set_attr "length" "8")])
8449
8450;;
8451;; [vstrhq_p_s vstrhq_p_u]
8452;;
8453(define_insn "mve_vstrhq_p_<supf><mode>"
8454  [(set (match_operand:<MVE_H_ELEM> 0 "mve_memory_operand" "=Ux")
8455	(unspec:<MVE_H_ELEM> [(match_operand:MVE_6 1 "s_register_operand" "w")
8456			      (match_operand:HI 2 "vpr_register_operand" "Up")]
8457	 VSTRHQ))
8458  ]
8459  "TARGET_HAVE_MVE"
8460{
8461   rtx ops[2];
8462   int regno = REGNO (operands[1]);
8463   ops[1] = gen_rtx_REG (TImode, regno);
8464   ops[0]  = operands[0];
8465   output_asm_insn ("vpst\;vstrht.<V_sz_elem>\t%q1, %E0",ops);
8466   return "";
8467}
8468  [(set_attr "length" "8")])
8469
8470;;
8471;; [vstrhq_scatter_offset_p_s vstrhq_scatter_offset_p_u]
8472;;
8473(define_expand "mve_vstrhq_scatter_offset_p_<supf><mode>"
8474  [(match_operand:<MVE_H_ELEM> 0 "mve_scatter_memory")
8475   (match_operand:MVE_6 1 "s_register_operand")
8476   (match_operand:MVE_6 2 "s_register_operand")
8477   (match_operand:HI 3 "vpr_register_operand")
8478   (unspec:V4SI [(const_int 0)] VSTRHSOQ)]
8479  "TARGET_HAVE_MVE"
8480{
8481  rtx ind = XEXP (operands[0], 0);
8482  gcc_assert (REG_P (ind));
8483  emit_insn (
8484    gen_mve_vstrhq_scatter_offset_p_<supf><mode>_insn (ind, operands[1],
8485						       operands[2],
8486						       operands[3]));
8487  DONE;
8488})
8489
8490(define_insn "mve_vstrhq_scatter_offset_p_<supf><mode>_insn"
8491  [(set (mem:BLK (scratch))
8492	(unspec:BLK
8493	  [(match_operand:SI 0 "register_operand" "r")
8494	   (match_operand:MVE_6 1 "s_register_operand" "w")
8495	   (match_operand:MVE_6 2 "s_register_operand" "w")
8496	   (match_operand:HI 3 "vpr_register_operand" "Up")]
8497	  VSTRHSOQ))]
8498  "TARGET_HAVE_MVE"
8499  "vpst\;vstrht.<V_sz_elem>\t%q2, [%0, %q1]"
8500  [(set_attr "length" "8")])
8501
8502;;
8503;; [vstrhq_scatter_offset_s vstrhq_scatter_offset_u]
8504;;
8505(define_expand "mve_vstrhq_scatter_offset_<supf><mode>"
8506  [(match_operand:<MVE_H_ELEM> 0 "mve_scatter_memory")
8507   (match_operand:MVE_6 1 "s_register_operand")
8508   (match_operand:MVE_6 2 "s_register_operand")
8509   (unspec:V4SI [(const_int 0)] VSTRHSOQ)]
8510  "TARGET_HAVE_MVE"
8511{
8512  rtx ind = XEXP (operands[0], 0);
8513  gcc_assert (REG_P (ind));
8514  emit_insn (gen_mve_vstrhq_scatter_offset_<supf><mode>_insn (ind, operands[1],
8515							      operands[2]));
8516  DONE;
8517})
8518
8519(define_insn "mve_vstrhq_scatter_offset_<supf><mode>_insn"
8520  [(set (mem:BLK (scratch))
8521	(unspec:BLK
8522	  [(match_operand:SI 0 "register_operand" "r")
8523	   (match_operand:MVE_6 1 "s_register_operand" "w")
8524	   (match_operand:MVE_6 2 "s_register_operand" "w")]
8525	  VSTRHSOQ))]
8526  "TARGET_HAVE_MVE"
8527  "vstrh.<V_sz_elem>\t%q2, [%0, %q1]"
8528  [(set_attr "length" "4")])
8529
8530;;
8531;; [vstrhq_scatter_shifted_offset_p_s vstrhq_scatter_shifted_offset_p_u]
8532;;
8533(define_expand "mve_vstrhq_scatter_shifted_offset_p_<supf><mode>"
8534  [(match_operand:<MVE_H_ELEM> 0 "mve_scatter_memory")
8535   (match_operand:MVE_6 1 "s_register_operand")
8536   (match_operand:MVE_6 2 "s_register_operand")
8537   (match_operand:HI 3 "vpr_register_operand")
8538   (unspec:V4SI [(const_int 0)] VSTRHSSOQ)]
8539  "TARGET_HAVE_MVE"
8540{
8541  rtx ind = XEXP (operands[0], 0);
8542  gcc_assert (REG_P (ind));
8543  emit_insn (
8544    gen_mve_vstrhq_scatter_shifted_offset_p_<supf><mode>_insn (ind, operands[1],
8545							       operands[2],
8546							       operands[3]));
8547  DONE;
8548})
8549
8550(define_insn "mve_vstrhq_scatter_shifted_offset_p_<supf><mode>_insn"
8551  [(set (mem:BLK (scratch))
8552	(unspec:BLK
8553	  [(match_operand:SI 0 "register_operand" "r")
8554	   (match_operand:MVE_6 1 "s_register_operand" "w")
8555	   (match_operand:MVE_6 2 "s_register_operand" "w")
8556	   (match_operand:HI 3 "vpr_register_operand" "Up")]
8557	  VSTRHSSOQ))]
8558  "TARGET_HAVE_MVE"
8559  "vpst\;vstrht.<V_sz_elem>\t%q2, [%0, %q1, uxtw #1]"
8560  [(set_attr "length" "8")])
8561
8562;;
8563;; [vstrhq_scatter_shifted_offset_s vstrhq_scatter_shifted_offset_u]
8564;;
8565(define_expand "mve_vstrhq_scatter_shifted_offset_<supf><mode>"
8566  [(match_operand:<MVE_H_ELEM> 0 "mve_scatter_memory")
8567   (match_operand:MVE_6 1 "s_register_operand")
8568   (match_operand:MVE_6 2 "s_register_operand")
8569   (unspec:V4SI [(const_int 0)] VSTRHSSOQ)]
8570  "TARGET_HAVE_MVE"
8571{
8572  rtx ind = XEXP (operands[0], 0);
8573  gcc_assert (REG_P (ind));
8574  emit_insn (
8575    gen_mve_vstrhq_scatter_shifted_offset_<supf><mode>_insn (ind, operands[1],
8576							     operands[2]));
8577  DONE;
8578})
8579
8580(define_insn "mve_vstrhq_scatter_shifted_offset_<supf><mode>_insn"
8581  [(set (mem:BLK (scratch))
8582	(unspec:BLK
8583	  [(match_operand:SI 0 "register_operand" "r")
8584	   (match_operand:MVE_6 1 "s_register_operand" "w")
8585	   (match_operand:MVE_6 2 "s_register_operand" "w")]
8586	  VSTRHSSOQ))]
8587  "TARGET_HAVE_MVE"
8588  "vstrh.<V_sz_elem>\t%q2, [%0, %q1, uxtw #1]"
8589  [(set_attr "length" "4")])
8590
8591;;
8592;; [vstrhq_s, vstrhq_u]
8593;;
8594(define_insn "mve_vstrhq_<supf><mode>"
8595  [(set (match_operand:<MVE_H_ELEM> 0 "mve_memory_operand" "=Ux")
8596	(unspec:<MVE_H_ELEM> [(match_operand:MVE_6 1 "s_register_operand" "w")]
8597	 VSTRHQ))
8598  ]
8599  "TARGET_HAVE_MVE"
8600{
8601   rtx ops[2];
8602   int regno = REGNO (operands[1]);
8603   ops[1] = gen_rtx_REG (TImode, regno);
8604   ops[0]  = operands[0];
8605   output_asm_insn ("vstrh.<V_sz_elem>\t%q1, %E0",ops);
8606   return "";
8607}
8608  [(set_attr "length" "4")])
8609
8610;;
8611;; [vstrwq_f]
8612;;
8613(define_insn "mve_vstrwq_fv4sf"
8614  [(set (match_operand:V4SI 0 "memory_operand" "=Ux")
8615	(unspec:V4SI [(match_operand:V4SF 1 "s_register_operand" "w")]
8616	 VSTRWQ_F))
8617  ]
8618  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8619{
8620   rtx ops[2];
8621   int regno = REGNO (operands[1]);
8622   ops[1] = gen_rtx_REG (TImode, regno);
8623   ops[0]  = operands[0];
8624   output_asm_insn ("vstrw.32\t%q1, %E0",ops);
8625   return "";
8626}
8627  [(set_attr "length" "4")])
8628
8629;;
8630;; [vstrwq_p_f]
8631;;
8632(define_insn "mve_vstrwq_p_fv4sf"
8633  [(set (match_operand:V4SI 0 "memory_operand" "=Ux")
8634	(unspec:V4SI [(match_operand:V4SF 1 "s_register_operand" "w")
8635		      (match_operand:HI 2 "vpr_register_operand" "Up")]
8636	 VSTRWQ_F))
8637  ]
8638  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8639{
8640   rtx ops[2];
8641   int regno = REGNO (operands[1]);
8642   ops[1] = gen_rtx_REG (TImode, regno);
8643   ops[0]  = operands[0];
8644   output_asm_insn ("vpst\;vstrwt.32\t%q1, %E0",ops);
8645   return "";
8646}
8647  [(set_attr "length" "8")])
8648
8649;;
8650;; [vstrwq_p_s vstrwq_p_u]
8651;;
8652(define_insn "mve_vstrwq_p_<supf>v4si"
8653  [(set (match_operand:V4SI 0 "memory_operand" "=Ux")
8654	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
8655		      (match_operand:HI 2 "vpr_register_operand" "Up")]
8656	 VSTRWQ))
8657  ]
8658  "TARGET_HAVE_MVE"
8659{
8660   rtx ops[2];
8661   int regno = REGNO (operands[1]);
8662   ops[1] = gen_rtx_REG (TImode, regno);
8663   ops[0]  = operands[0];
8664   output_asm_insn ("vpst\;vstrwt.32\t%q1, %E0",ops);
8665   return "";
8666}
8667  [(set_attr "length" "8")])
8668
8669;;
8670;; [vstrwq_s vstrwq_u]
8671;;
8672(define_insn "mve_vstrwq_<supf>v4si"
8673  [(set (match_operand:V4SI 0 "memory_operand" "=Ux")
8674	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")]
8675	 VSTRWQ))
8676  ]
8677  "TARGET_HAVE_MVE"
8678{
8679   rtx ops[2];
8680   int regno = REGNO (operands[1]);
8681   ops[1] = gen_rtx_REG (TImode, regno);
8682   ops[0]  = operands[0];
8683   output_asm_insn ("vstrw.32\t%q1, %E0",ops);
8684   return "";
8685}
8686  [(set_attr "length" "4")])
8687
8688(define_expand "mve_vst1q_f<mode>"
8689  [(match_operand:<MVE_CNVT> 0 "mve_memory_operand")
8690   (unspec:<MVE_CNVT> [(match_operand:MVE_0 1 "s_register_operand")] VST1Q_F)
8691  ]
8692  "TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT"
8693{
8694  emit_insn (gen_mve_vstr<V_sz_elem1>q_f<mode>(operands[0],operands[1]));
8695  DONE;
8696})
8697
8698(define_expand "mve_vst1q_<supf><mode>"
8699  [(match_operand:MVE_2 0 "mve_memory_operand")
8700   (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand")] VST1Q)
8701  ]
8702  "TARGET_HAVE_MVE"
8703{
8704  emit_insn (gen_mve_vstr<V_sz_elem1>q_<supf><mode>(operands[0],operands[1]));
8705  DONE;
8706})
8707
8708;;
8709;; [vstrdq_scatter_base_p_s vstrdq_scatter_base_p_u]
8710;;
8711(define_insn "mve_vstrdq_scatter_base_p_<supf>v2di"
8712  [(set (mem:BLK (scratch))
8713	(unspec:BLK
8714		[(match_operand:V2DI 0 "s_register_operand" "w")
8715		 (match_operand:SI 1 "mve_vldrd_immediate" "Ri")
8716		 (match_operand:V2DI 2 "s_register_operand" "w")
8717		 (match_operand:HI 3 "vpr_register_operand" "Up")]
8718	 VSTRDSBQ))
8719  ]
8720  "TARGET_HAVE_MVE"
8721{
8722   rtx ops[3];
8723   ops[0] = operands[0];
8724   ops[1] = operands[1];
8725   ops[2] = operands[2];
8726   output_asm_insn ("vpst\;\tvstrdt.u64\t%q2, [%q0, %1]",ops);
8727   return "";
8728}
8729  [(set_attr "length" "8")])
8730
8731;;
8732;; [vstrdq_scatter_base_s vstrdq_scatter_base_u]
8733;;
8734(define_insn "mve_vstrdq_scatter_base_<supf>v2di"
8735  [(set (mem:BLK (scratch))
8736	(unspec:BLK
8737		[(match_operand:V2DI 0 "s_register_operand" "=w")
8738		 (match_operand:SI 1 "mve_vldrd_immediate" "Ri")
8739		 (match_operand:V2DI 2 "s_register_operand" "w")]
8740	 VSTRDSBQ))
8741  ]
8742  "TARGET_HAVE_MVE"
8743{
8744   rtx ops[3];
8745   ops[0] = operands[0];
8746   ops[1] = operands[1];
8747   ops[2] = operands[2];
8748   output_asm_insn ("vstrd.u64\t%q2, [%q0, %1]",ops);
8749   return "";
8750}
8751  [(set_attr "length" "4")])
8752
8753;;
8754;; [vstrdq_scatter_offset_p_s vstrdq_scatter_offset_p_u]
8755;;
8756(define_expand "mve_vstrdq_scatter_offset_p_<supf>v2di"
8757  [(match_operand:V2DI 0 "mve_scatter_memory")
8758   (match_operand:V2DI 1 "s_register_operand")
8759   (match_operand:V2DI 2 "s_register_operand")
8760   (match_operand:HI 3 "vpr_register_operand")
8761   (unspec:V4SI [(const_int 0)] VSTRDSOQ)]
8762  "TARGET_HAVE_MVE"
8763{
8764  rtx ind = XEXP (operands[0], 0);
8765  gcc_assert (REG_P (ind));
8766  emit_insn (gen_mve_vstrdq_scatter_offset_p_<supf>v2di_insn (ind, operands[1],
8767							      operands[2],
8768							      operands[3]));
8769  DONE;
8770})
8771
8772(define_insn "mve_vstrdq_scatter_offset_p_<supf>v2di_insn"
8773  [(set (mem:BLK (scratch))
8774	(unspec:BLK
8775	  [(match_operand:SI 0 "register_operand" "r")
8776	   (match_operand:V2DI 1 "s_register_operand" "w")
8777	   (match_operand:V2DI 2 "s_register_operand" "w")
8778	   (match_operand:HI 3 "vpr_register_operand" "Up")]
8779	  VSTRDSOQ))]
8780  "TARGET_HAVE_MVE"
8781  "vpst\;vstrdt.64\t%q2, [%0, %q1]"
8782  [(set_attr "length" "8")])
8783
8784;;
8785;; [vstrdq_scatter_offset_s vstrdq_scatter_offset_u]
8786;;
8787(define_expand "mve_vstrdq_scatter_offset_<supf>v2di"
8788  [(match_operand:V2DI 0 "mve_scatter_memory")
8789   (match_operand:V2DI 1 "s_register_operand")
8790   (match_operand:V2DI 2 "s_register_operand")
8791   (unspec:V4SI [(const_int 0)] VSTRDSOQ)]
8792  "TARGET_HAVE_MVE"
8793{
8794  rtx ind = XEXP (operands[0], 0);
8795  gcc_assert (REG_P (ind));
8796  emit_insn (gen_mve_vstrdq_scatter_offset_<supf>v2di_insn (ind, operands[1],
8797							    operands[2]));
8798  DONE;
8799})
8800
8801(define_insn "mve_vstrdq_scatter_offset_<supf>v2di_insn"
8802  [(set (mem:BLK (scratch))
8803	(unspec:BLK
8804	  [(match_operand:SI 0 "register_operand" "r")
8805	   (match_operand:V2DI 1 "s_register_operand" "w")
8806	   (match_operand:V2DI 2 "s_register_operand" "w")]
8807	  VSTRDSOQ))]
8808  "TARGET_HAVE_MVE"
8809  "vstrd.64\t%q2, [%0, %q1]"
8810  [(set_attr "length" "4")])
8811
8812;;
8813;; [vstrdq_scatter_shifted_offset_p_s vstrdq_scatter_shifted_offset_p_u]
8814;;
8815(define_expand "mve_vstrdq_scatter_shifted_offset_p_<supf>v2di"
8816  [(match_operand:V2DI 0 "mve_scatter_memory")
8817   (match_operand:V2DI 1 "s_register_operand")
8818   (match_operand:V2DI 2 "s_register_operand")
8819   (match_operand:HI 3 "vpr_register_operand")
8820   (unspec:V4SI [(const_int 0)] VSTRDSSOQ)]
8821  "TARGET_HAVE_MVE"
8822{
8823  rtx ind = XEXP (operands[0], 0);
8824  gcc_assert (REG_P (ind));
8825  emit_insn (
8826    gen_mve_vstrdq_scatter_shifted_offset_p_<supf>v2di_insn (ind, operands[1],
8827							     operands[2],
8828							     operands[3]));
8829  DONE;
8830})
8831
8832(define_insn "mve_vstrdq_scatter_shifted_offset_p_<supf>v2di_insn"
8833  [(set (mem:BLK (scratch))
8834	(unspec:BLK
8835	  [(match_operand:SI 0 "register_operand" "r")
8836	   (match_operand:V2DI 1 "s_register_operand" "w")
8837	   (match_operand:V2DI 2 "s_register_operand" "w")
8838	   (match_operand:HI 3 "vpr_register_operand" "Up")]
8839	  VSTRDSSOQ))]
8840  "TARGET_HAVE_MVE"
8841  "vpst\;vstrdt.64\t%q2, [%0, %q1, UXTW #3]"
8842  [(set_attr "length" "8")])
8843
8844;;
8845;; [vstrdq_scatter_shifted_offset_s vstrdq_scatter_shifted_offset_u]
8846;;
8847(define_expand "mve_vstrdq_scatter_shifted_offset_<supf>v2di"
8848  [(match_operand:V2DI 0 "mve_scatter_memory")
8849   (match_operand:V2DI 1 "s_register_operand")
8850   (match_operand:V2DI 2 "s_register_operand")
8851   (unspec:V4SI [(const_int 0)] VSTRDSSOQ)]
8852  "TARGET_HAVE_MVE"
8853{
8854  rtx ind = XEXP (operands[0], 0);
8855  gcc_assert (REG_P (ind));
8856  emit_insn (
8857    gen_mve_vstrdq_scatter_shifted_offset_<supf>v2di_insn (ind, operands[1],
8858							   operands[2]));
8859  DONE;
8860})
8861
8862(define_insn "mve_vstrdq_scatter_shifted_offset_<supf>v2di_insn"
8863  [(set (mem:BLK (scratch))
8864	(unspec:BLK
8865	  [(match_operand:SI 0 "register_operand" "r")
8866	   (match_operand:V2DI 1 "s_register_operand" "w")
8867	   (match_operand:V2DI 2 "s_register_operand" "w")]
8868	  VSTRDSSOQ))]
8869  "TARGET_HAVE_MVE"
8870  "vstrd.64\t%q2, [%0, %q1, UXTW #3]"
8871  [(set_attr "length" "4")])
8872
8873;;
8874;; [vstrhq_scatter_offset_f]
8875;;
8876(define_expand "mve_vstrhq_scatter_offset_fv8hf"
8877  [(match_operand:V8HI 0 "mve_scatter_memory")
8878   (match_operand:V8HI 1 "s_register_operand")
8879   (match_operand:V8HF 2 "s_register_operand")
8880   (unspec:V4SI [(const_int 0)] VSTRHQSO_F)]
8881  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8882{
8883  rtx ind = XEXP (operands[0], 0);
8884  gcc_assert (REG_P (ind));
8885  emit_insn (gen_mve_vstrhq_scatter_offset_fv8hf_insn (ind, operands[1],
8886						       operands[2]));
8887  DONE;
8888})
8889
8890(define_insn "mve_vstrhq_scatter_offset_fv8hf_insn"
8891  [(set (mem:BLK (scratch))
8892	(unspec:BLK
8893	  [(match_operand:SI 0 "register_operand" "r")
8894	   (match_operand:V8HI 1 "s_register_operand" "w")
8895	   (match_operand:V8HF 2 "s_register_operand" "w")]
8896	  VSTRHQSO_F))]
8897  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8898  "vstrh.16\t%q2, [%0, %q1]"
8899  [(set_attr "length" "4")])
8900
8901;;
8902;; [vstrhq_scatter_offset_p_f]
8903;;
8904(define_expand "mve_vstrhq_scatter_offset_p_fv8hf"
8905  [(match_operand:V8HI 0 "mve_scatter_memory")
8906   (match_operand:V8HI 1 "s_register_operand")
8907   (match_operand:V8HF 2 "s_register_operand")
8908   (match_operand:HI 3 "vpr_register_operand")
8909   (unspec:V4SI [(const_int 0)] VSTRHQSO_F)]
8910  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8911{
8912  rtx ind = XEXP (operands[0], 0);
8913  gcc_assert (REG_P (ind));
8914  emit_insn (gen_mve_vstrhq_scatter_offset_p_fv8hf_insn (ind, operands[1],
8915							 operands[2],
8916							 operands[3]));
8917  DONE;
8918})
8919
8920(define_insn "mve_vstrhq_scatter_offset_p_fv8hf_insn"
8921  [(set (mem:BLK (scratch))
8922	(unspec:BLK
8923	  [(match_operand:SI 0 "register_operand" "r")
8924	   (match_operand:V8HI 1 "s_register_operand" "w")
8925	   (match_operand:V8HF 2 "s_register_operand" "w")
8926	   (match_operand:HI 3 "vpr_register_operand" "Up")]
8927	  VSTRHQSO_F))]
8928  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8929  "vpst\;vstrht.16\t%q2, [%0, %q1]"
8930  [(set_attr "length" "8")])
8931
8932;;
8933;; [vstrhq_scatter_shifted_offset_f]
8934;;
8935(define_expand "mve_vstrhq_scatter_shifted_offset_fv8hf"
8936  [(match_operand:V8HI 0 "memory_operand" "=Us")
8937   (match_operand:V8HI 1 "s_register_operand" "w")
8938   (match_operand:V8HF 2 "s_register_operand" "w")
8939   (unspec:V4SI [(const_int 0)] VSTRHQSSO_F)]
8940  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8941{
8942  rtx ind = XEXP (operands[0], 0);
8943  gcc_assert (REG_P (ind));
8944  emit_insn (gen_mve_vstrhq_scatter_shifted_offset_fv8hf_insn (ind, operands[1],
8945							       operands[2]));
8946  DONE;
8947})
8948
8949(define_insn "mve_vstrhq_scatter_shifted_offset_fv8hf_insn"
8950  [(set (mem:BLK (scratch))
8951	(unspec:BLK
8952	  [(match_operand:SI 0 "register_operand" "r")
8953	   (match_operand:V8HI 1 "s_register_operand" "w")
8954	   (match_operand:V8HF 2 "s_register_operand" "w")]
8955	  VSTRHQSSO_F))]
8956  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8957  "vstrh.16\t%q2, [%0, %q1, uxtw #1]"
8958  [(set_attr "length" "4")])
8959
8960;;
8961;; [vstrhq_scatter_shifted_offset_p_f]
8962;;
8963(define_expand "mve_vstrhq_scatter_shifted_offset_p_fv8hf"
8964  [(match_operand:V8HI 0 "memory_operand" "=Us")
8965   (match_operand:V8HI 1 "s_register_operand" "w")
8966   (match_operand:V8HF 2 "s_register_operand" "w")
8967   (match_operand:HI 3 "vpr_register_operand" "Up")
8968   (unspec:V4SI [(const_int 0)] VSTRHQSSO_F)]
8969  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8970{
8971  rtx ind = XEXP (operands[0], 0);
8972  gcc_assert (REG_P (ind));
8973  emit_insn (
8974    gen_mve_vstrhq_scatter_shifted_offset_p_fv8hf_insn (ind, operands[1],
8975							operands[2],
8976							operands[3]));
8977  DONE;
8978})
8979
8980(define_insn "mve_vstrhq_scatter_shifted_offset_p_fv8hf_insn"
8981  [(set (mem:BLK (scratch))
8982	(unspec:BLK
8983	  [(match_operand:SI 0 "register_operand" "r")
8984	   (match_operand:V8HI 1 "s_register_operand" "w")
8985	   (match_operand:V8HF 2 "s_register_operand" "w")
8986	   (match_operand:HI 3 "vpr_register_operand" "Up")]
8987	  VSTRHQSSO_F))]
8988  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
8989  "vpst\;vstrht.16\t%q2, [%0, %q1, uxtw #1]"
8990  [(set_attr "length" "8")])
8991
8992;;
8993;; [vstrwq_scatter_base_f]
8994;;
8995(define_insn "mve_vstrwq_scatter_base_fv4sf"
8996  [(set (mem:BLK (scratch))
8997	(unspec:BLK
8998		[(match_operand:V4SI 0 "s_register_operand" "w")
8999		 (match_operand:SI 1 "immediate_operand" "i")
9000		 (match_operand:V4SF 2 "s_register_operand" "w")]
9001	 VSTRWQSB_F))
9002  ]
9003  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9004{
9005   rtx ops[3];
9006   ops[0] = operands[0];
9007   ops[1] = operands[1];
9008   ops[2] = operands[2];
9009   output_asm_insn ("vstrw.u32\t%q2, [%q0, %1]",ops);
9010   return "";
9011}
9012  [(set_attr "length" "4")])
9013
9014;;
9015;; [vstrwq_scatter_base_p_f]
9016;;
9017(define_insn "mve_vstrwq_scatter_base_p_fv4sf"
9018  [(set (mem:BLK (scratch))
9019	(unspec:BLK
9020		[(match_operand:V4SI 0 "s_register_operand" "w")
9021		 (match_operand:SI 1 "immediate_operand" "i")
9022		 (match_operand:V4SF 2 "s_register_operand" "w")
9023		 (match_operand:HI 3 "vpr_register_operand" "Up")]
9024	 VSTRWQSB_F))
9025  ]
9026  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9027{
9028   rtx ops[3];
9029   ops[0] = operands[0];
9030   ops[1] = operands[1];
9031   ops[2] = operands[2];
9032   output_asm_insn ("vpst\n\tvstrwt.u32\t%q2, [%q0, %1]",ops);
9033   return "";
9034}
9035  [(set_attr "length" "8")])
9036
9037;;
9038;; [vstrwq_scatter_offset_f]
9039;;
9040(define_expand "mve_vstrwq_scatter_offset_fv4sf"
9041  [(match_operand:V4SI 0 "mve_scatter_memory")
9042   (match_operand:V4SI 1 "s_register_operand")
9043   (match_operand:V4SF 2 "s_register_operand")
9044   (unspec:V4SI [(const_int 0)] VSTRWQSO_F)]
9045  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9046{
9047  rtx ind = XEXP (operands[0], 0);
9048  gcc_assert (REG_P (ind));
9049  emit_insn (gen_mve_vstrwq_scatter_offset_fv4sf_insn (ind, operands[1],
9050						       operands[2]));
9051  DONE;
9052})
9053
9054(define_insn "mve_vstrwq_scatter_offset_fv4sf_insn"
9055  [(set (mem:BLK (scratch))
9056	(unspec:BLK
9057	  [(match_operand:SI 0 "register_operand" "r")
9058	   (match_operand:V4SI 1 "s_register_operand" "w")
9059	   (match_operand:V4SF 2 "s_register_operand" "w")]
9060	  VSTRWQSO_F))]
9061  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9062  "vstrw.32\t%q2, [%0, %q1]"
9063  [(set_attr "length" "4")])
9064
9065;;
9066;; [vstrwq_scatter_offset_p_f]
9067;;
9068(define_expand "mve_vstrwq_scatter_offset_p_fv4sf"
9069  [(match_operand:V4SI 0 "mve_scatter_memory")
9070   (match_operand:V4SI 1 "s_register_operand")
9071   (match_operand:V4SF 2 "s_register_operand")
9072   (match_operand:HI 3 "vpr_register_operand")
9073   (unspec:V4SI [(const_int 0)] VSTRWQSO_F)]
9074  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9075{
9076  rtx ind = XEXP (operands[0], 0);
9077  gcc_assert (REG_P (ind));
9078  emit_insn (gen_mve_vstrwq_scatter_offset_p_fv4sf_insn (ind, operands[1],
9079							 operands[2],
9080							 operands[3]));
9081  DONE;
9082})
9083
9084(define_insn "mve_vstrwq_scatter_offset_p_fv4sf_insn"
9085  [(set (mem:BLK (scratch))
9086	(unspec:BLK
9087	  [(match_operand:SI 0 "register_operand" "r")
9088	   (match_operand:V4SI 1 "s_register_operand" "w")
9089	   (match_operand:V4SF 2 "s_register_operand" "w")
9090	   (match_operand:HI 3 "vpr_register_operand" "Up")]
9091	  VSTRWQSO_F))]
9092  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9093  "vpst\;vstrwt.32\t%q2, [%0, %q1]"
9094  [(set_attr "length" "8")])
9095
9096;;
9097;; [vstrwq_scatter_offset_s vstrwq_scatter_offset_u]
9098;;
9099(define_expand "mve_vstrwq_scatter_offset_p_<supf>v4si"
9100  [(match_operand:V4SI 0 "mve_scatter_memory")
9101   (match_operand:V4SI 1 "s_register_operand")
9102   (match_operand:V4SI 2 "s_register_operand")
9103   (match_operand:HI 3 "vpr_register_operand")
9104   (unspec:V4SI [(const_int 0)] VSTRWSOQ)]
9105  "TARGET_HAVE_MVE"
9106{
9107  rtx ind = XEXP (operands[0], 0);
9108  gcc_assert (REG_P (ind));
9109  emit_insn (gen_mve_vstrwq_scatter_offset_p_<supf>v4si_insn (ind, operands[1],
9110							      operands[2],
9111							      operands[3]));
9112  DONE;
9113})
9114
9115(define_insn "mve_vstrwq_scatter_offset_p_<supf>v4si_insn"
9116  [(set (mem:BLK (scratch))
9117	(unspec:BLK
9118	  [(match_operand:SI 0 "register_operand" "r")
9119	   (match_operand:V4SI 1 "s_register_operand" "w")
9120	   (match_operand:V4SI 2 "s_register_operand" "w")
9121	   (match_operand:HI 3 "vpr_register_operand" "Up")]
9122	  VSTRWSOQ))]
9123  "TARGET_HAVE_MVE"
9124  "vpst\;vstrwt.32\t%q2, [%0, %q1]"
9125  [(set_attr "length" "8")])
9126
9127;;
9128;; [vstrwq_scatter_offset_s vstrwq_scatter_offset_u]
9129;;
9130(define_expand "mve_vstrwq_scatter_offset_<supf>v4si"
9131  [(match_operand:V4SI 0 "mve_scatter_memory")
9132   (match_operand:V4SI 1 "s_register_operand")
9133   (match_operand:V4SI 2 "s_register_operand")
9134   (unspec:V4SI [(const_int 0)] VSTRWSOQ)]
9135  "TARGET_HAVE_MVE"
9136{
9137  rtx ind = XEXP (operands[0], 0);
9138  gcc_assert (REG_P (ind));
9139  emit_insn (gen_mve_vstrwq_scatter_offset_<supf>v4si_insn (ind, operands[1],
9140							    operands[2]));
9141  DONE;
9142})
9143
9144(define_insn "mve_vstrwq_scatter_offset_<supf>v4si_insn"
9145  [(set (mem:BLK (scratch))
9146	(unspec:BLK
9147	  [(match_operand:SI 0 "register_operand" "r")
9148	   (match_operand:V4SI 1 "s_register_operand" "w")
9149	   (match_operand:V4SI 2 "s_register_operand" "w")]
9150	  VSTRWSOQ))]
9151  "TARGET_HAVE_MVE"
9152  "vstrw.32\t%q2, [%0, %q1]"
9153  [(set_attr "length" "4")])
9154
9155;;
9156;; [vstrwq_scatter_shifted_offset_f]
9157;;
9158(define_expand "mve_vstrwq_scatter_shifted_offset_fv4sf"
9159  [(match_operand:V4SI 0 "mve_scatter_memory")
9160   (match_operand:V4SI 1 "s_register_operand")
9161   (match_operand:V4SF 2 "s_register_operand")
9162   (unspec:V4SI [(const_int 0)] VSTRWQSSO_F)]
9163  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9164{
9165  rtx ind = XEXP (operands[0], 0);
9166  gcc_assert (REG_P (ind));
9167  emit_insn (gen_mve_vstrwq_scatter_shifted_offset_fv4sf_insn (ind, operands[1],
9168							       operands[2]));
9169  DONE;
9170})
9171
9172(define_insn "mve_vstrwq_scatter_shifted_offset_fv4sf_insn"
9173  [(set (mem:BLK (scratch))
9174	(unspec:BLK
9175	  [(match_operand:SI 0 "register_operand" "r")
9176	   (match_operand:V4SI 1 "s_register_operand" "w")
9177	   (match_operand:V4SF 2 "s_register_operand" "w")]
9178	 VSTRWQSSO_F))]
9179  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9180  "vstrw.32\t%q2, [%0, %q1, uxtw #2]"
9181  [(set_attr "length" "8")])
9182
9183;;
9184;; [vstrwq_scatter_shifted_offset_p_f]
9185;;
9186(define_expand "mve_vstrwq_scatter_shifted_offset_p_fv4sf"
9187  [(match_operand:V4SI 0 "mve_scatter_memory")
9188   (match_operand:V4SI 1 "s_register_operand")
9189   (match_operand:V4SF 2 "s_register_operand")
9190   (match_operand:HI 3 "vpr_register_operand")
9191   (unspec:V4SI [(const_int 0)] VSTRWQSSO_F)]
9192  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9193{
9194  rtx ind = XEXP (operands[0], 0);
9195  gcc_assert (REG_P (ind));
9196  emit_insn (
9197    gen_mve_vstrwq_scatter_shifted_offset_p_fv4sf_insn (ind, operands[1],
9198							operands[2],
9199							operands[3]));
9200  DONE;
9201})
9202
9203(define_insn "mve_vstrwq_scatter_shifted_offset_p_fv4sf_insn"
9204  [(set (mem:BLK (scratch))
9205	(unspec:BLK
9206	  [(match_operand:SI 0 "register_operand" "r")
9207	   (match_operand:V4SI 1 "s_register_operand" "w")
9208	   (match_operand:V4SF 2 "s_register_operand" "w")
9209	   (match_operand:HI 3 "vpr_register_operand" "Up")]
9210	  VSTRWQSSO_F))]
9211  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9212  "vpst\;vstrwt.32\t%q2, [%0, %q1, uxtw #2]"
9213  [(set_attr "length" "8")])
9214
9215;;
9216;; [vstrwq_scatter_shifted_offset_p_s vstrwq_scatter_shifted_offset_p_u]
9217;;
9218(define_expand "mve_vstrwq_scatter_shifted_offset_p_<supf>v4si"
9219  [(match_operand:V4SI 0 "mve_scatter_memory")
9220   (match_operand:V4SI 1 "s_register_operand")
9221   (match_operand:V4SI 2 "s_register_operand")
9222   (match_operand:HI 3 "vpr_register_operand")
9223   (unspec:V4SI [(const_int 0)] VSTRWSSOQ)]
9224  "TARGET_HAVE_MVE"
9225{
9226  rtx ind = XEXP (operands[0], 0);
9227  gcc_assert (REG_P (ind));
9228  emit_insn (
9229    gen_mve_vstrwq_scatter_shifted_offset_p_<supf>v4si_insn (ind, operands[1],
9230							     operands[2],
9231							     operands[3]));
9232  DONE;
9233})
9234
9235(define_insn "mve_vstrwq_scatter_shifted_offset_p_<supf>v4si_insn"
9236  [(set (mem:BLK (scratch))
9237	(unspec:BLK
9238	  [(match_operand:SI 0 "register_operand" "r")
9239	   (match_operand:V4SI 1 "s_register_operand" "w")
9240	   (match_operand:V4SI 2 "s_register_operand" "w")
9241	   (match_operand:HI 3 "vpr_register_operand" "Up")]
9242	  VSTRWSSOQ))]
9243  "TARGET_HAVE_MVE"
9244  "vpst\;vstrwt.32\t%q2, [%0, %q1, uxtw #2]"
9245  [(set_attr "length" "8")])
9246
9247;;
9248;; [vstrwq_scatter_shifted_offset_s vstrwq_scatter_shifted_offset_u]
9249;;
9250(define_expand "mve_vstrwq_scatter_shifted_offset_<supf>v4si"
9251  [(match_operand:V4SI 0 "mve_scatter_memory")
9252   (match_operand:V4SI 1 "s_register_operand")
9253   (match_operand:V4SI 2 "s_register_operand")
9254   (unspec:V4SI [(const_int 0)] VSTRWSSOQ)]
9255  "TARGET_HAVE_MVE"
9256{
9257  rtx ind = XEXP (operands[0], 0);
9258  gcc_assert (REG_P (ind));
9259  emit_insn (
9260    gen_mve_vstrwq_scatter_shifted_offset_<supf>v4si_insn (ind, operands[1],
9261							   operands[2]));
9262  DONE;
9263})
9264
9265(define_insn "mve_vstrwq_scatter_shifted_offset_<supf>v4si_insn"
9266  [(set (mem:BLK (scratch))
9267	(unspec:BLK
9268	  [(match_operand:SI 0 "register_operand" "r")
9269	   (match_operand:V4SI 1 "s_register_operand" "w")
9270	   (match_operand:V4SI 2 "s_register_operand" "w")]
9271	  VSTRWSSOQ))]
9272  "TARGET_HAVE_MVE"
9273  "vstrw.32\t%q2, [%0, %q1, uxtw #2]"
9274  [(set_attr "length" "4")])
9275
9276;;
9277;; [vaddq_s, vaddq_u])
9278;;
9279(define_insn "mve_vaddq<mode>"
9280  [
9281   (set (match_operand:MVE_2 0 "s_register_operand" "=w")
9282	(plus:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w")
9283		    (match_operand:MVE_2 2 "s_register_operand" "w")))
9284  ]
9285  "TARGET_HAVE_MVE"
9286  "vadd.i%#<V_sz_elem>  %q0, %q1, %q2"
9287  [(set_attr "type" "mve_move")
9288])
9289
9290;;
9291;; [vaddq_f])
9292;;
9293(define_insn "mve_vaddq_f<mode>"
9294  [
9295   (set (match_operand:MVE_0 0 "s_register_operand" "=w")
9296	(plus:MVE_0 (match_operand:MVE_0 1 "s_register_operand" "w")
9297		    (match_operand:MVE_0 2 "s_register_operand" "w")))
9298  ]
9299  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9300  "vadd.f%#<V_sz_elem> %q0, %q1, %q2"
9301  [(set_attr "type" "mve_move")
9302])
9303
9304;;
9305;; [vidupq_n_u])
9306;;
9307(define_expand "mve_vidupq_n_u<mode>"
9308 [(match_operand:MVE_2 0 "s_register_operand")
9309  (match_operand:SI 1 "s_register_operand")
9310  (match_operand:SI 2 "mve_imm_selective_upto_8")]
9311 "TARGET_HAVE_MVE"
9312{
9313  rtx temp = gen_reg_rtx (SImode);
9314  emit_move_insn (temp, operands[1]);
9315  rtx inc = gen_int_mode (INTVAL(operands[2]) * <MVE_LANES>, SImode);
9316  emit_insn (gen_mve_vidupq_u<mode>_insn (operands[0], temp, operands[1],
9317					  operands[2], inc));
9318  DONE;
9319})
9320
9321;;
9322;; [vidupq_u_insn])
9323;;
9324(define_insn "mve_vidupq_u<mode>_insn"
9325 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
9326       (unspec:MVE_2 [(match_operand:SI 2 "s_register_operand" "1")
9327		      (match_operand:SI 3 "mve_imm_selective_upto_8" "Rg")]
9328	 VIDUPQ))
9329  (set (match_operand:SI 1 "s_register_operand" "=Te")
9330       (plus:SI (match_dup 2)
9331		(match_operand:SI 4 "immediate_operand" "i")))]
9332 "TARGET_HAVE_MVE"
9333 "vidup.u%#<V_sz_elem>\t%q0, %1, %3")
9334
9335;;
9336;; [vidupq_m_n_u])
9337;;
9338(define_expand "mve_vidupq_m_n_u<mode>"
9339  [(match_operand:MVE_2 0 "s_register_operand")
9340   (match_operand:MVE_2 1 "s_register_operand")
9341   (match_operand:SI 2 "s_register_operand")
9342   (match_operand:SI 3 "mve_imm_selective_upto_8")
9343   (match_operand:HI 4 "vpr_register_operand")]
9344  "TARGET_HAVE_MVE"
9345{
9346  rtx temp = gen_reg_rtx (SImode);
9347  emit_move_insn (temp, operands[2]);
9348  rtx inc = gen_int_mode (INTVAL(operands[3]) * <MVE_LANES>, SImode);
9349  emit_insn (gen_mve_vidupq_m_wb_u<mode>_insn(operands[0], operands[1], temp,
9350					     operands[2], operands[3],
9351					     operands[4], inc));
9352  DONE;
9353})
9354
9355;;
9356;; [vidupq_m_wb_u_insn])
9357;;
9358(define_insn "mve_vidupq_m_wb_u<mode>_insn"
9359 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
9360       (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
9361		      (match_operand:SI 3 "s_register_operand" "2")
9362		      (match_operand:SI 4 "mve_imm_selective_upto_8" "Rg")
9363		      (match_operand:HI 5 "vpr_register_operand" "Up")]
9364	VIDUPQ_M))
9365  (set (match_operand:SI 2 "s_register_operand" "=Te")
9366       (plus:SI (match_dup 3)
9367		(match_operand:SI 6 "immediate_operand" "i")))]
9368 "TARGET_HAVE_MVE"
9369 "vpst\;\tvidupt.u%#<V_sz_elem>\t%q0, %2, %4"
9370 [(set_attr "length""8")])
9371
9372;;
9373;; [vddupq_n_u])
9374;;
9375(define_expand "mve_vddupq_n_u<mode>"
9376 [(match_operand:MVE_2 0 "s_register_operand")
9377  (match_operand:SI 1 "s_register_operand")
9378  (match_operand:SI 2 "mve_imm_selective_upto_8")]
9379 "TARGET_HAVE_MVE"
9380{
9381  rtx temp = gen_reg_rtx (SImode);
9382  emit_move_insn (temp, operands[1]);
9383  rtx inc = gen_int_mode (INTVAL(operands[2]) * <MVE_LANES>, SImode);
9384  emit_insn (gen_mve_vddupq_u<mode>_insn (operands[0], temp, operands[1],
9385					  operands[2], inc));
9386  DONE;
9387})
9388
9389;;
9390;; [vddupq_u_insn])
9391;;
9392(define_insn "mve_vddupq_u<mode>_insn"
9393 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
9394       (unspec:MVE_2 [(match_operand:SI 2 "s_register_operand" "1")
9395		      (match_operand:SI 3 "immediate_operand" "i")]
9396	VDDUPQ))
9397  (set (match_operand:SI 1 "s_register_operand" "=Te")
9398       (minus:SI (match_dup 2)
9399		 (match_operand:SI 4 "immediate_operand" "i")))]
9400 "TARGET_HAVE_MVE"
9401 "vddup.u%#<V_sz_elem>  %q0, %1, %3")
9402
9403;;
9404;; [vddupq_m_n_u])
9405;;
9406(define_expand "mve_vddupq_m_n_u<mode>"
9407  [(match_operand:MVE_2 0 "s_register_operand")
9408   (match_operand:MVE_2 1 "s_register_operand")
9409   (match_operand:SI 2 "s_register_operand")
9410   (match_operand:SI 3 "mve_imm_selective_upto_8")
9411   (match_operand:HI 4 "vpr_register_operand")]
9412  "TARGET_HAVE_MVE"
9413{
9414  rtx temp = gen_reg_rtx (SImode);
9415  emit_move_insn (temp, operands[2]);
9416  rtx inc = gen_int_mode (INTVAL(operands[3]) * <MVE_LANES>, SImode);
9417  emit_insn (gen_mve_vddupq_m_wb_u<mode>_insn(operands[0], operands[1], temp,
9418					     operands[2], operands[3],
9419					     operands[4], inc));
9420  DONE;
9421})
9422
9423;;
9424;; [vddupq_m_wb_u_insn])
9425;;
9426(define_insn "mve_vddupq_m_wb_u<mode>_insn"
9427 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
9428       (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
9429		      (match_operand:SI 3 "s_register_operand" "2")
9430		      (match_operand:SI 4 "mve_imm_selective_upto_8" "Rg")
9431		      (match_operand:HI 5 "vpr_register_operand" "Up")]
9432	VDDUPQ_M))
9433  (set (match_operand:SI 2 "s_register_operand" "=Te")
9434       (minus:SI (match_dup 3)
9435		 (match_operand:SI 6 "immediate_operand" "i")))]
9436 "TARGET_HAVE_MVE"
9437 "vpst\;\tvddupt.u%#<V_sz_elem>\t%q0, %2, %4"
9438 [(set_attr "length""8")])
9439
9440;;
9441;; [vdwdupq_n_u])
9442;;
9443(define_expand "mve_vdwdupq_n_u<mode>"
9444 [(match_operand:MVE_2 0 "s_register_operand")
9445  (match_operand:SI 1 "s_register_operand")
9446  (match_operand:DI 2 "s_register_operand")
9447  (match_operand:SI 3 "mve_imm_selective_upto_8")]
9448 "TARGET_HAVE_MVE"
9449{
9450  rtx ignore_wb = gen_reg_rtx (SImode);
9451  emit_insn (gen_mve_vdwdupq_wb_u<mode>_insn (operands[0], ignore_wb,
9452					      operands[1], operands[2],
9453					      operands[3]));
9454  DONE;
9455})
9456
9457;;
9458;; [vdwdupq_wb_u])
9459;;
9460(define_expand "mve_vdwdupq_wb_u<mode>"
9461 [(match_operand:SI 0 "s_register_operand")
9462  (match_operand:SI 1 "s_register_operand")
9463  (match_operand:DI 2 "s_register_operand")
9464  (match_operand:SI 3 "mve_imm_selective_upto_8")
9465  (unspec:MVE_2 [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
9466 "TARGET_HAVE_MVE"
9467{
9468  rtx ignore_vec = gen_reg_rtx (<MODE>mode);
9469  emit_insn (gen_mve_vdwdupq_wb_u<mode>_insn (ignore_vec, operands[0],
9470					      operands[1], operands[2],
9471					      operands[3]));
9472  DONE;
9473})
9474
9475;;
9476;; [vdwdupq_wb_u_insn])
9477;;
9478(define_insn "mve_vdwdupq_wb_u<mode>_insn"
9479  [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
9480	(unspec:MVE_2 [(match_operand:SI 2 "s_register_operand" "1")
9481		       (subreg:SI (match_operand:DI 3 "s_register_operand" "r") 4)
9482		       (match_operand:SI 4 "mve_imm_selective_upto_8" "Rg")]
9483	 VDWDUPQ))
9484   (set (match_operand:SI 1 "s_register_operand" "=Te")
9485	(unspec:SI [(match_dup 2)
9486		    (subreg:SI (match_dup 3) 4)
9487		    (match_dup 4)]
9488	 VDWDUPQ))]
9489  "TARGET_HAVE_MVE"
9490  "vdwdup.u%#<V_sz_elem>\t%q0, %2, %R3, %4"
9491)
9492
9493;;
9494;; [vdwdupq_m_n_u])
9495;;
9496(define_expand "mve_vdwdupq_m_n_u<mode>"
9497 [(match_operand:MVE_2 0 "s_register_operand")
9498  (match_operand:MVE_2 1 "s_register_operand")
9499  (match_operand:SI 2 "s_register_operand")
9500  (match_operand:DI 3 "s_register_operand")
9501  (match_operand:SI 4 "mve_imm_selective_upto_8")
9502  (match_operand:HI 5 "vpr_register_operand")]
9503 "TARGET_HAVE_MVE"
9504{
9505  rtx ignore_wb = gen_reg_rtx (SImode);
9506  emit_insn (gen_mve_vdwdupq_m_wb_u<mode>_insn (operands[0], ignore_wb,
9507						operands[1], operands[2],
9508						operands[3], operands[4],
9509						operands[5]));
9510  DONE;
9511})
9512
9513;;
9514;; [vdwdupq_m_wb_u])
9515;;
9516(define_expand "mve_vdwdupq_m_wb_u<mode>"
9517 [(match_operand:SI 0 "s_register_operand")
9518  (match_operand:MVE_2 1 "s_register_operand")
9519  (match_operand:SI 2 "s_register_operand")
9520  (match_operand:DI 3 "s_register_operand")
9521  (match_operand:SI 4 "mve_imm_selective_upto_8")
9522  (match_operand:HI 5 "vpr_register_operand")]
9523 "TARGET_HAVE_MVE"
9524{
9525  rtx ignore_vec = gen_reg_rtx (<MODE>mode);
9526  emit_insn (gen_mve_vdwdupq_m_wb_u<mode>_insn (ignore_vec, operands[0],
9527						operands[1], operands[2],
9528						operands[3], operands[4],
9529						operands[5]));
9530  DONE;
9531})
9532
9533;;
9534;; [vdwdupq_m_wb_u_insn])
9535;;
9536(define_insn "mve_vdwdupq_m_wb_u<mode>_insn"
9537  [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
9538	(unspec:MVE_2 [(match_operand:MVE_2 2 "s_register_operand" "0")
9539		       (match_operand:SI 3 "s_register_operand" "1")
9540		       (subreg:SI (match_operand:DI 4 "s_register_operand" "r") 4)
9541		       (match_operand:SI 5 "mve_imm_selective_upto_8" "Rg")
9542		       (match_operand:HI 6 "vpr_register_operand" "Up")]
9543	 VDWDUPQ_M))
9544   (set (match_operand:SI 1 "s_register_operand" "=Te")
9545	(unspec:SI [(match_dup 2)
9546		    (match_dup 3)
9547		    (subreg:SI (match_dup 4) 4)
9548		    (match_dup 5)
9549		    (match_dup 6)]
9550	 VDWDUPQ_M))
9551  ]
9552  "TARGET_HAVE_MVE"
9553  "vpst\;\tvdwdupt.u%#<V_sz_elem>\t%q2, %3, %R4, %5"
9554  [(set_attr "type" "mve_move")
9555   (set_attr "length""8")])
9556
9557;;
9558;; [viwdupq_n_u])
9559;;
9560(define_expand "mve_viwdupq_n_u<mode>"
9561 [(match_operand:MVE_2 0 "s_register_operand")
9562  (match_operand:SI 1 "s_register_operand")
9563  (match_operand:DI 2 "s_register_operand")
9564  (match_operand:SI 3 "mve_imm_selective_upto_8")]
9565 "TARGET_HAVE_MVE"
9566{
9567  rtx ignore_wb = gen_reg_rtx (SImode);
9568  emit_insn (gen_mve_viwdupq_wb_u<mode>_insn (operands[0], ignore_wb,
9569					      operands[1], operands[2],
9570					      operands[3]));
9571  DONE;
9572})
9573
9574;;
9575;; [viwdupq_wb_u])
9576;;
9577(define_expand "mve_viwdupq_wb_u<mode>"
9578 [(match_operand:SI 0 "s_register_operand")
9579  (match_operand:SI 1 "s_register_operand")
9580  (match_operand:DI 2 "s_register_operand")
9581  (match_operand:SI 3 "mve_imm_selective_upto_8")
9582  (unspec:MVE_2 [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
9583 "TARGET_HAVE_MVE"
9584{
9585  rtx ignore_vec = gen_reg_rtx (<MODE>mode);
9586  emit_insn (gen_mve_viwdupq_wb_u<mode>_insn (ignore_vec, operands[0],
9587					      operands[1], operands[2],
9588					      operands[3]));
9589  DONE;
9590})
9591
9592;;
9593;; [viwdupq_wb_u_insn])
9594;;
9595(define_insn "mve_viwdupq_wb_u<mode>_insn"
9596  [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
9597	(unspec:MVE_2 [(match_operand:SI 2 "s_register_operand" "1")
9598		       (subreg:SI (match_operand:DI 3 "s_register_operand" "r") 4)
9599		       (match_operand:SI 4 "mve_imm_selective_upto_8" "Rg")]
9600	 VIWDUPQ))
9601   (set (match_operand:SI 1 "s_register_operand" "=Te")
9602	(unspec:SI [(match_dup 2)
9603		    (subreg:SI (match_dup 3) 4)
9604		    (match_dup 4)]
9605	 VIWDUPQ))]
9606  "TARGET_HAVE_MVE"
9607  "viwdup.u%#<V_sz_elem>\t%q0, %2, %R3, %4"
9608)
9609
9610;;
9611;; [viwdupq_m_n_u])
9612;;
9613(define_expand "mve_viwdupq_m_n_u<mode>"
9614 [(match_operand:MVE_2 0 "s_register_operand")
9615  (match_operand:MVE_2 1 "s_register_operand")
9616  (match_operand:SI 2 "s_register_operand")
9617  (match_operand:DI 3 "s_register_operand")
9618  (match_operand:SI 4 "mve_imm_selective_upto_8")
9619  (match_operand:HI 5 "vpr_register_operand")]
9620 "TARGET_HAVE_MVE"
9621{
9622  rtx ignore_wb = gen_reg_rtx (SImode);
9623  emit_insn (gen_mve_viwdupq_m_wb_u<mode>_insn (operands[0], ignore_wb,
9624						operands[1], operands[2],
9625						operands[3], operands[4],
9626						operands[5]));
9627  DONE;
9628})
9629
9630;;
9631;; [viwdupq_m_wb_u])
9632;;
9633(define_expand "mve_viwdupq_m_wb_u<mode>"
9634 [(match_operand:SI 0 "s_register_operand")
9635  (match_operand:MVE_2 1 "s_register_operand")
9636  (match_operand:SI 2 "s_register_operand")
9637  (match_operand:DI 3 "s_register_operand")
9638  (match_operand:SI 4 "mve_imm_selective_upto_8")
9639  (match_operand:HI 5 "vpr_register_operand")]
9640 "TARGET_HAVE_MVE"
9641{
9642  rtx ignore_vec = gen_reg_rtx (<MODE>mode);
9643  emit_insn (gen_mve_viwdupq_m_wb_u<mode>_insn (ignore_vec, operands[0],
9644						operands[1], operands[2],
9645						operands[3], operands[4],
9646						operands[5]));
9647  DONE;
9648})
9649
9650;;
9651;; [viwdupq_m_wb_u_insn])
9652;;
9653(define_insn "mve_viwdupq_m_wb_u<mode>_insn"
9654  [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
9655	(unspec:MVE_2 [(match_operand:MVE_2 2 "s_register_operand" "0")
9656		       (match_operand:SI 3 "s_register_operand" "1")
9657		       (subreg:SI (match_operand:DI 4 "s_register_operand" "r") 4)
9658		       (match_operand:SI 5 "mve_imm_selective_upto_8" "Rg")
9659		       (match_operand:HI 6 "vpr_register_operand" "Up")]
9660	 VIWDUPQ_M))
9661   (set (match_operand:SI 1 "s_register_operand" "=Te")
9662	(unspec:SI [(match_dup 2)
9663		    (match_dup 3)
9664		    (subreg:SI (match_dup 4) 4)
9665		    (match_dup 5)
9666		    (match_dup 6)]
9667	 VIWDUPQ_M))
9668  ]
9669  "TARGET_HAVE_MVE"
9670  "vpst\;\tviwdupt.u%#<V_sz_elem>\t%q2, %3, %R4, %5"
9671  [(set_attr "type" "mve_move")
9672   (set_attr "length""8")])
9673
9674;;
9675;; [vstrwq_scatter_base_wb_s vstrwq_scatter_base_wb_u]
9676;;
9677(define_insn "mve_vstrwq_scatter_base_wb_<supf>v4si"
9678  [(set (mem:BLK (scratch))
9679	(unspec:BLK
9680		[(match_operand:V4SI 1 "s_register_operand" "0")
9681		 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
9682		 (match_operand:V4SI 3 "s_register_operand" "w")]
9683	 VSTRWSBWBQ))
9684   (set (match_operand:V4SI 0 "s_register_operand" "=w")
9685	(unspec:V4SI [(match_dup 1) (match_dup 2)]
9686	 VSTRWSBWBQ))
9687  ]
9688  "TARGET_HAVE_MVE"
9689{
9690   rtx ops[3];
9691   ops[0] = operands[1];
9692   ops[1] = operands[2];
9693   ops[2] = operands[3];
9694   output_asm_insn ("vstrw.u32\t%q2, [%q0, %1]!",ops);
9695   return "";
9696}
9697  [(set_attr "length" "4")])
9698
9699;;
9700;; [vstrwq_scatter_base_wb_p_s vstrwq_scatter_base_wb_p_u]
9701;;
9702(define_insn "mve_vstrwq_scatter_base_wb_p_<supf>v4si"
9703 [(set (mem:BLK (scratch))
9704       (unspec:BLK
9705		[(match_operand:V4SI 1 "s_register_operand" "0")
9706		 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
9707		 (match_operand:V4SI 3 "s_register_operand" "w")
9708		 (match_operand:HI 4 "vpr_register_operand")]
9709	VSTRWSBWBQ))
9710   (set (match_operand:V4SI 0 "s_register_operand" "=w")
9711	(unspec:V4SI [(match_dup 1) (match_dup 2)]
9712	 VSTRWSBWBQ))
9713  ]
9714  "TARGET_HAVE_MVE"
9715{
9716   rtx ops[3];
9717   ops[0] = operands[1];
9718   ops[1] = operands[2];
9719   ops[2] = operands[3];
9720   output_asm_insn ("vpst\;\tvstrwt.u32\t%q2, [%q0, %1]!",ops);
9721   return "";
9722}
9723  [(set_attr "length" "8")])
9724
9725;;
9726;; [vstrwq_scatter_base_wb_f]
9727;;
9728(define_insn "mve_vstrwq_scatter_base_wb_fv4sf"
9729 [(set (mem:BLK (scratch))
9730       (unspec:BLK
9731		[(match_operand:V4SI 1 "s_register_operand" "0")
9732		 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
9733		 (match_operand:V4SF 3 "s_register_operand" "w")]
9734	 VSTRWQSBWB_F))
9735   (set (match_operand:V4SI 0 "s_register_operand" "=w")
9736	(unspec:V4SI [(match_dup 1) (match_dup 2)]
9737	 VSTRWQSBWB_F))
9738  ]
9739  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9740{
9741   rtx ops[3];
9742   ops[0] = operands[1];
9743   ops[1] = operands[2];
9744   ops[2] = operands[3];
9745   output_asm_insn ("vstrw.u32\t%q2, [%q0, %1]!",ops);
9746   return "";
9747}
9748  [(set_attr "length" "4")])
9749
9750;;
9751;; [vstrwq_scatter_base_wb_p_f]
9752;;
9753(define_insn "mve_vstrwq_scatter_base_wb_p_fv4sf"
9754 [(set (mem:BLK (scratch))
9755       (unspec:BLK
9756		[(match_operand:V4SI 1 "s_register_operand" "0")
9757		 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
9758		 (match_operand:V4SF 3 "s_register_operand" "w")
9759		 (match_operand:HI 4 "vpr_register_operand")]
9760	VSTRWQSBWB_F))
9761   (set (match_operand:V4SI 0 "s_register_operand" "=w")
9762	(unspec:V4SI [(match_dup 1) (match_dup 2)]
9763	 VSTRWQSBWB_F))
9764  ]
9765  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9766{
9767   rtx ops[3];
9768   ops[0] = operands[1];
9769   ops[1] = operands[2];
9770   ops[2] = operands[3];
9771   output_asm_insn ("vpst\;\tvstrwt.u32\t%q2, [%q0, %1]!",ops);
9772   return "";
9773}
9774  [(set_attr "length" "8")])
9775
9776;;
9777;; [vstrdq_scatter_base_wb_s vstrdq_scatter_base_wb_u]
9778;;
9779(define_insn "mve_vstrdq_scatter_base_wb_<supf>v2di"
9780  [(set (mem:BLK (scratch))
9781	(unspec:BLK
9782		[(match_operand:V2DI 1 "s_register_operand" "0")
9783		 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
9784		 (match_operand:V2DI 3 "s_register_operand" "w")]
9785	 VSTRDSBWBQ))
9786   (set (match_operand:V2DI 0 "s_register_operand" "=&w")
9787	(unspec:V2DI [(match_dup 1) (match_dup 2)]
9788	 VSTRDSBWBQ))
9789  ]
9790  "TARGET_HAVE_MVE"
9791{
9792   rtx ops[3];
9793   ops[0] = operands[1];
9794   ops[1] = operands[2];
9795   ops[2] = operands[3];
9796   output_asm_insn ("vstrd.u64\t%q2, [%q0, %1]!",ops);
9797   return "";
9798}
9799  [(set_attr "length" "4")])
9800
9801;;
9802;; [vstrdq_scatter_base_wb_p_s vstrdq_scatter_base_wb_p_u]
9803;;
9804(define_insn "mve_vstrdq_scatter_base_wb_p_<supf>v2di"
9805  [(set (mem:BLK (scratch))
9806	(unspec:BLK
9807		[(match_operand:V2DI 1 "s_register_operand" "0")
9808		 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
9809		 (match_operand:V2DI 3 "s_register_operand" "w")
9810		 (match_operand:HI 4 "vpr_register_operand")]
9811	 VSTRDSBWBQ))
9812   (set (match_operand:V2DI 0 "s_register_operand" "=w")
9813	(unspec:V2DI [(match_dup 1) (match_dup 2)]
9814	 VSTRDSBWBQ))
9815  ]
9816  "TARGET_HAVE_MVE"
9817{
9818   rtx ops[3];
9819   ops[0] = operands[1];
9820   ops[1] = operands[2];
9821   ops[2] = operands[3];
9822   output_asm_insn ("vpst;vstrdt.u64\t%q2, [%q0, %1]!",ops);
9823   return "";
9824}
9825  [(set_attr "length" "8")])
9826
9827(define_expand "mve_vldrwq_gather_base_wb_<supf>v4si"
9828  [(match_operand:V4SI 0 "s_register_operand")
9829   (match_operand:V4SI 1 "s_register_operand")
9830   (match_operand:SI 2 "mve_vldrd_immediate")
9831   (unspec:V4SI [(const_int 0)] VLDRWGBWBQ)]
9832  "TARGET_HAVE_MVE"
9833{
9834  rtx ignore_result = gen_reg_rtx (V4SImode);
9835  emit_insn (
9836  gen_mve_vldrwq_gather_base_wb_<supf>v4si_insn (ignore_result, operands[0],
9837						 operands[1], operands[2]));
9838  DONE;
9839})
9840
9841(define_expand "mve_vldrwq_gather_base_nowb_<supf>v4si"
9842  [(match_operand:V4SI 0 "s_register_operand")
9843   (match_operand:V4SI 1 "s_register_operand")
9844   (match_operand:SI 2 "mve_vldrd_immediate")
9845   (unspec:V4SI [(const_int 0)] VLDRWGBWBQ)]
9846  "TARGET_HAVE_MVE"
9847{
9848  rtx ignore_wb = gen_reg_rtx (V4SImode);
9849  emit_insn (
9850  gen_mve_vldrwq_gather_base_wb_<supf>v4si_insn (operands[0], ignore_wb,
9851						 operands[1], operands[2]));
9852  DONE;
9853})
9854
9855;;
9856;; [vldrwq_gather_base_wb_s vldrwq_gather_base_wb_u]
9857;;
9858(define_insn "mve_vldrwq_gather_base_wb_<supf>v4si_insn"
9859  [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
9860	(unspec:V4SI [(match_operand:V4SI 2 "s_register_operand" "1")
9861		      (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
9862		      (mem:BLK (scratch))]
9863	 VLDRWGBWBQ))
9864   (set (match_operand:V4SI 1 "s_register_operand" "=&w")
9865	(unspec:V4SI [(match_dup 2) (match_dup 3)]
9866	 VLDRWGBWBQ))
9867  ]
9868  "TARGET_HAVE_MVE"
9869{
9870   rtx ops[3];
9871   ops[0] = operands[0];
9872   ops[1] = operands[2];
9873   ops[2] = operands[3];
9874   output_asm_insn ("vldrw.u32\t%q0, [%q1, %2]!",ops);
9875   return "";
9876}
9877  [(set_attr "length" "4")])
9878
9879(define_expand "mve_vldrwq_gather_base_wb_z_<supf>v4si"
9880  [(match_operand:V4SI 0 "s_register_operand")
9881   (match_operand:V4SI 1 "s_register_operand")
9882   (match_operand:SI 2 "mve_vldrd_immediate")
9883   (match_operand:HI 3 "vpr_register_operand")
9884   (unspec:V4SI [(const_int 0)] VLDRWGBWBQ)]
9885  "TARGET_HAVE_MVE"
9886{
9887  rtx ignore_result = gen_reg_rtx (V4SImode);
9888  emit_insn (
9889  gen_mve_vldrwq_gather_base_wb_z_<supf>v4si_insn (ignore_result, operands[0],
9890						   operands[1], operands[2],
9891						   operands[3]));
9892  DONE;
9893})
9894(define_expand "mve_vldrwq_gather_base_nowb_z_<supf>v4si"
9895  [(match_operand:V4SI 0 "s_register_operand")
9896   (match_operand:V4SI 1 "s_register_operand")
9897   (match_operand:SI 2 "mve_vldrd_immediate")
9898   (match_operand:HI 3 "vpr_register_operand")
9899   (unspec:V4SI [(const_int 0)] VLDRWGBWBQ)]
9900  "TARGET_HAVE_MVE"
9901{
9902  rtx ignore_wb = gen_reg_rtx (V4SImode);
9903  emit_insn (
9904  gen_mve_vldrwq_gather_base_wb_z_<supf>v4si_insn (operands[0], ignore_wb,
9905						   operands[1], operands[2],
9906						   operands[3]));
9907  DONE;
9908})
9909
9910;;
9911;; [vldrwq_gather_base_wb_z_s vldrwq_gather_base_wb_z_u]
9912;;
9913(define_insn "mve_vldrwq_gather_base_wb_z_<supf>v4si_insn"
9914  [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
9915	(unspec:V4SI [(match_operand:V4SI 2 "s_register_operand" "1")
9916		      (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
9917		      (match_operand:HI 4 "vpr_register_operand" "Up")
9918		      (mem:BLK (scratch))]
9919	 VLDRWGBWBQ))
9920   (set (match_operand:V4SI 1 "s_register_operand" "=&w")
9921	(unspec:V4SI [(match_dup 2) (match_dup 3)]
9922	 VLDRWGBWBQ))
9923  ]
9924  "TARGET_HAVE_MVE"
9925{
9926   rtx ops[3];
9927   ops[0] = operands[0];
9928   ops[1] = operands[2];
9929   ops[2] = operands[3];
9930   output_asm_insn ("vpst\;vldrwt.u32\t%q0, [%q1, %2]!",ops);
9931   return "";
9932}
9933  [(set_attr "length" "8")])
9934
9935(define_expand "mve_vldrwq_gather_base_wb_fv4sf"
9936  [(match_operand:V4SI 0 "s_register_operand")
9937   (match_operand:V4SI 1 "s_register_operand")
9938   (match_operand:SI 2 "mve_vldrd_immediate")
9939   (unspec:V4SI [(const_int 0)] VLDRWQGBWB_F)]
9940  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9941{
9942  rtx ignore_result = gen_reg_rtx (V4SFmode);
9943  emit_insn (
9944  gen_mve_vldrwq_gather_base_wb_fv4sf_insn (ignore_result, operands[0],
9945					    operands[1], operands[2]));
9946  DONE;
9947})
9948
9949(define_expand "mve_vldrwq_gather_base_nowb_fv4sf"
9950  [(match_operand:V4SF 0 "s_register_operand")
9951   (match_operand:V4SI 1 "s_register_operand")
9952   (match_operand:SI 2 "mve_vldrd_immediate")
9953   (unspec:V4SI [(const_int 0)] VLDRWQGBWB_F)]
9954  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9955{
9956  rtx ignore_wb = gen_reg_rtx (V4SImode);
9957  emit_insn (
9958  gen_mve_vldrwq_gather_base_wb_fv4sf_insn (operands[0], ignore_wb,
9959					    operands[1], operands[2]));
9960  DONE;
9961})
9962
9963;;
9964;; [vldrwq_gather_base_wb_f]
9965;;
9966(define_insn "mve_vldrwq_gather_base_wb_fv4sf_insn"
9967  [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
9968	(unspec:V4SF [(match_operand:V4SI 2 "s_register_operand" "1")
9969		      (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
9970		      (mem:BLK (scratch))]
9971	 VLDRWQGBWB_F))
9972   (set (match_operand:V4SI 1 "s_register_operand" "=&w")
9973	(unspec:V4SI [(match_dup 2) (match_dup 3)]
9974	 VLDRWQGBWB_F))
9975  ]
9976  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9977{
9978   rtx ops[3];
9979   ops[0] = operands[0];
9980   ops[1] = operands[2];
9981   ops[2] = operands[3];
9982   output_asm_insn ("vldrw.u32\t%q0, [%q1, %2]!",ops);
9983   return "";
9984}
9985  [(set_attr "length" "4")])
9986
9987(define_expand "mve_vldrwq_gather_base_wb_z_fv4sf"
9988  [(match_operand:V4SI 0 "s_register_operand")
9989   (match_operand:V4SI 1 "s_register_operand")
9990   (match_operand:SI 2 "mve_vldrd_immediate")
9991   (match_operand:HI 3 "vpr_register_operand")
9992   (unspec:V4SI [(const_int 0)] VLDRWQGBWB_F)]
9993  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
9994{
9995  rtx ignore_result = gen_reg_rtx (V4SFmode);
9996  emit_insn (
9997  gen_mve_vldrwq_gather_base_wb_z_fv4sf_insn (ignore_result, operands[0],
9998					      operands[1], operands[2],
9999					      operands[3]));
10000  DONE;
10001})
10002
10003(define_expand "mve_vldrwq_gather_base_nowb_z_fv4sf"
10004  [(match_operand:V4SF 0 "s_register_operand")
10005   (match_operand:V4SI 1 "s_register_operand")
10006   (match_operand:SI 2 "mve_vldrd_immediate")
10007   (match_operand:HI 3 "vpr_register_operand")
10008   (unspec:V4SI [(const_int 0)] VLDRWQGBWB_F)]
10009  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
10010{
10011  rtx ignore_wb = gen_reg_rtx (V4SImode);
10012  emit_insn (
10013  gen_mve_vldrwq_gather_base_wb_z_fv4sf_insn (operands[0], ignore_wb,
10014					      operands[1], operands[2],
10015					      operands[3]));
10016  DONE;
10017})
10018
10019;;
10020;; [vldrwq_gather_base_wb_z_f]
10021;;
10022(define_insn "mve_vldrwq_gather_base_wb_z_fv4sf_insn"
10023  [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
10024	(unspec:V4SF [(match_operand:V4SI 2 "s_register_operand" "1")
10025		      (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
10026		      (match_operand:HI 4 "vpr_register_operand" "Up")
10027		      (mem:BLK (scratch))]
10028	 VLDRWQGBWB_F))
10029   (set (match_operand:V4SI 1 "s_register_operand" "=&w")
10030	(unspec:V4SI [(match_dup 2) (match_dup 3)]
10031	 VLDRWQGBWB_F))
10032  ]
10033  "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
10034{
10035   rtx ops[3];
10036   ops[0] = operands[0];
10037   ops[1] = operands[2];
10038   ops[2] = operands[3];
10039   output_asm_insn ("vpst\;vldrwt.u32\t%q0, [%q1, %2]!",ops);
10040   return "";
10041}
10042  [(set_attr "length" "8")])
10043
10044(define_expand "mve_vldrdq_gather_base_wb_<supf>v2di"
10045  [(match_operand:V2DI 0 "s_register_operand")
10046   (match_operand:V2DI 1 "s_register_operand")
10047   (match_operand:SI 2 "mve_vldrd_immediate")
10048   (unspec:V2DI [(const_int 0)] VLDRDGBWBQ)]
10049  "TARGET_HAVE_MVE"
10050{
10051  rtx ignore_result = gen_reg_rtx (V2DImode);
10052  emit_insn (
10053  gen_mve_vldrdq_gather_base_wb_<supf>v2di_insn (ignore_result, operands[0],
10054						 operands[1], operands[2]));
10055  DONE;
10056})
10057
10058(define_expand "mve_vldrdq_gather_base_nowb_<supf>v2di"
10059  [(match_operand:V2DI 0 "s_register_operand")
10060   (match_operand:V2DI 1 "s_register_operand")
10061   (match_operand:SI 2 "mve_vldrd_immediate")
10062   (unspec:V2DI [(const_int 0)] VLDRDGBWBQ)]
10063  "TARGET_HAVE_MVE"
10064{
10065  rtx ignore_wb = gen_reg_rtx (V2DImode);
10066  emit_insn (
10067  gen_mve_vldrdq_gather_base_wb_<supf>v2di_insn (operands[0], ignore_wb,
10068						 operands[1], operands[2]));
10069  DONE;
10070})
10071
10072
10073;;
10074;; [vldrdq_gather_base_wb_s vldrdq_gather_base_wb_u]
10075;;
10076(define_insn "mve_vldrdq_gather_base_wb_<supf>v2di_insn"
10077  [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
10078	(unspec:V2DI [(match_operand:V2DI 2 "s_register_operand" "1")
10079		      (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
10080		      (mem:BLK (scratch))]
10081	 VLDRDGBWBQ))
10082   (set (match_operand:V2DI 1 "s_register_operand" "=&w")
10083	(unspec:V2DI [(match_dup 2) (match_dup 3)]
10084	 VLDRDGBWBQ))
10085  ]
10086  "TARGET_HAVE_MVE"
10087{
10088   rtx ops[3];
10089   ops[0] = operands[0];
10090   ops[1] = operands[2];
10091   ops[2] = operands[3];
10092   output_asm_insn ("vldrd.64\t%q0, [%q1, %2]!",ops);
10093   return "";
10094}
10095  [(set_attr "length" "4")])
10096
10097(define_expand "mve_vldrdq_gather_base_wb_z_<supf>v2di"
10098  [(match_operand:V2DI 0 "s_register_operand")
10099   (match_operand:V2DI 1 "s_register_operand")
10100   (match_operand:SI 2 "mve_vldrd_immediate")
10101   (match_operand:HI 3 "vpr_register_operand")
10102   (unspec:V2DI [(const_int 0)] VLDRDGBWBQ)]
10103  "TARGET_HAVE_MVE"
10104{
10105  rtx ignore_result = gen_reg_rtx (V2DImode);
10106  emit_insn (
10107  gen_mve_vldrdq_gather_base_wb_z_<supf>v2di_insn (ignore_result, operands[0],
10108						   operands[1], operands[2],
10109						   operands[3]));
10110  DONE;
10111})
10112
10113(define_expand "mve_vldrdq_gather_base_nowb_z_<supf>v2di"
10114  [(match_operand:V2DI 0 "s_register_operand")
10115   (match_operand:V2DI 1 "s_register_operand")
10116   (match_operand:SI 2 "mve_vldrd_immediate")
10117   (match_operand:HI 3 "vpr_register_operand")
10118   (unspec:V2DI [(const_int 0)] VLDRDGBWBQ)]
10119  "TARGET_HAVE_MVE"
10120{
10121  rtx ignore_wb = gen_reg_rtx (V2DImode);
10122  emit_insn (
10123  gen_mve_vldrdq_gather_base_wb_z_<supf>v2di_insn (operands[0], ignore_wb,
10124						   operands[1], operands[2],
10125						   operands[3]));
10126  DONE;
10127})
10128
10129(define_insn "get_fpscr_nzcvqc"
10130 [(set (match_operand:SI 0 "register_operand" "=r")
10131   (unspec:SI [(reg:SI VFPCC_REGNUM)] UNSPEC_GET_FPSCR_NZCVQC))]
10132 "TARGET_HAVE_MVE"
10133 "vmrs\\t%0, FPSCR_nzcvqc"
10134  [(set_attr "type" "mve_move")])
10135
10136(define_insn "set_fpscr_nzcvqc"
10137 [(set (reg:SI VFPCC_REGNUM)
10138   (unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")]
10139    VUNSPEC_SET_FPSCR_NZCVQC))]
10140 "TARGET_HAVE_MVE"
10141 "vmsr\\tFPSCR_nzcvqc, %0"
10142  [(set_attr "type" "mve_move")])
10143
10144;;
10145;; [vldrdq_gather_base_wb_z_s vldrdq_gather_base_wb_z_u]
10146;;
10147(define_insn "mve_vldrdq_gather_base_wb_z_<supf>v2di_insn"
10148  [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
10149	(unspec:V2DI [(match_operand:V2DI 2 "s_register_operand" "1")
10150		      (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
10151		      (match_operand:HI 4 "vpr_register_operand" "Up")
10152		      (mem:BLK (scratch))]
10153	 VLDRDGBWBQ))
10154   (set (match_operand:V2DI 1 "s_register_operand" "=&w")
10155	(unspec:V2DI [(match_dup 2) (match_dup 3)]
10156	 VLDRDGBWBQ))
10157  ]
10158  "TARGET_HAVE_MVE"
10159{
10160   rtx ops[3];
10161   ops[0] = operands[0];
10162   ops[1] = operands[2];
10163   ops[2] = operands[3];
10164   output_asm_insn ("vpst\;vldrdt.u64\t%q0, [%q1, %2]!",ops);
10165   return "";
10166}
10167  [(set_attr "length" "8")])
10168;;
10169;; [vadciq_m_s, vadciq_m_u])
10170;;
10171(define_insn "mve_vadciq_m_<supf>v4si"
10172  [(set (match_operand:V4SI 0 "s_register_operand" "=w")
10173	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "0")
10174		      (match_operand:V4SI 2 "s_register_operand" "w")
10175		      (match_operand:V4SI 3 "s_register_operand" "w")
10176		      (match_operand:HI 4 "vpr_register_operand" "Up")]
10177	 VADCIQ_M))
10178   (set (reg:SI VFPCC_REGNUM)
10179	(unspec:SI [(const_int 0)]
10180	 VADCIQ_M))
10181  ]
10182  "TARGET_HAVE_MVE"
10183  "vpst\;vadcit.i32\t%q0, %q2, %q3"
10184  [(set_attr "type" "mve_move")
10185   (set_attr "length" "8")])
10186
10187;;
10188;; [vadciq_u, vadciq_s])
10189;;
10190(define_insn "mve_vadciq_<supf>v4si"
10191  [(set (match_operand:V4SI 0 "s_register_operand" "=w")
10192	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
10193		      (match_operand:V4SI 2 "s_register_operand" "w")]
10194	 VADCIQ))
10195   (set (reg:SI VFPCC_REGNUM)
10196	(unspec:SI [(const_int 0)]
10197	 VADCIQ))
10198  ]
10199  "TARGET_HAVE_MVE"
10200  "vadci.i32\t%q0, %q1, %q2"
10201  [(set_attr "type" "mve_move")
10202   (set_attr "length" "4")])
10203
10204;;
10205;; [vadcq_m_s, vadcq_m_u])
10206;;
10207(define_insn "mve_vadcq_m_<supf>v4si"
10208  [(set (match_operand:V4SI 0 "s_register_operand" "=w")
10209	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "0")
10210		      (match_operand:V4SI 2 "s_register_operand" "w")
10211		      (match_operand:V4SI 3 "s_register_operand" "w")
10212		      (match_operand:HI 4 "vpr_register_operand" "Up")]
10213	 VADCQ_M))
10214   (set (reg:SI VFPCC_REGNUM)
10215	(unspec:SI [(reg:SI VFPCC_REGNUM)]
10216	 VADCQ_M))
10217  ]
10218  "TARGET_HAVE_MVE"
10219  "vpst\;vadct.i32\t%q0, %q2, %q3"
10220  [(set_attr "type" "mve_move")
10221   (set_attr "length" "8")])
10222
10223;;
10224;; [vadcq_u, vadcq_s])
10225;;
10226(define_insn "mve_vadcq_<supf>v4si"
10227  [(set (match_operand:V4SI 0 "s_register_operand" "=w")
10228	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
10229		       (match_operand:V4SI 2 "s_register_operand" "w")]
10230	 VADCQ))
10231   (set (reg:SI VFPCC_REGNUM)
10232	(unspec:SI [(reg:SI VFPCC_REGNUM)]
10233	 VADCQ))
10234  ]
10235  "TARGET_HAVE_MVE"
10236  "vadc.i32\t%q0, %q1, %q2"
10237  [(set_attr "type" "mve_move")
10238   (set_attr "length" "4")
10239   (set_attr "conds" "set")])
10240
10241;;
10242;; [vsbciq_m_u, vsbciq_m_s])
10243;;
10244(define_insn "mve_vsbciq_m_<supf>v4si"
10245  [(set (match_operand:V4SI 0 "s_register_operand" "=w")
10246	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
10247		      (match_operand:V4SI 2 "s_register_operand" "w")
10248		      (match_operand:V4SI 3 "s_register_operand" "w")
10249		      (match_operand:HI 4 "vpr_register_operand" "Up")]
10250	 VSBCIQ_M))
10251   (set (reg:SI VFPCC_REGNUM)
10252	(unspec:SI [(const_int 0)]
10253	 VSBCIQ_M))
10254  ]
10255  "TARGET_HAVE_MVE"
10256  "vpst\;vsbcit.i32\t%q0, %q2, %q3"
10257  [(set_attr "type" "mve_move")
10258   (set_attr "length" "8")])
10259
10260;;
10261;; [vsbciq_s, vsbciq_u])
10262;;
10263(define_insn "mve_vsbciq_<supf>v4si"
10264  [(set (match_operand:V4SI 0 "s_register_operand" "=w")
10265	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
10266		      (match_operand:V4SI 2 "s_register_operand" "w")]
10267	 VSBCIQ))
10268   (set (reg:SI VFPCC_REGNUM)
10269	(unspec:SI [(const_int 0)]
10270	 VSBCIQ))
10271  ]
10272  "TARGET_HAVE_MVE"
10273  "vsbci.i32\t%q0, %q1, %q2"
10274  [(set_attr "type" "mve_move")
10275   (set_attr "length" "4")])
10276
10277;;
10278;; [vsbcq_m_u, vsbcq_m_s])
10279;;
10280(define_insn "mve_vsbcq_m_<supf>v4si"
10281  [(set (match_operand:V4SI 0 "s_register_operand" "=w")
10282	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
10283		      (match_operand:V4SI 2 "s_register_operand" "w")
10284		      (match_operand:V4SI 3 "s_register_operand" "w")
10285		      (match_operand:HI 4 "vpr_register_operand" "Up")]
10286	 VSBCQ_M))
10287   (set (reg:SI VFPCC_REGNUM)
10288	(unspec:SI [(reg:SI VFPCC_REGNUM)]
10289	 VSBCQ_M))
10290  ]
10291  "TARGET_HAVE_MVE"
10292  "vpst\;vsbct.i32\t%q0, %q2, %q3"
10293  [(set_attr "type" "mve_move")
10294   (set_attr "length" "8")])
10295
10296;;
10297;; [vsbcq_s, vsbcq_u])
10298;;
10299(define_insn "mve_vsbcq_<supf>v4si"
10300  [(set (match_operand:V4SI 0 "s_register_operand" "=w")
10301	(unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
10302		      (match_operand:V4SI 2 "s_register_operand" "w")]
10303	 VSBCQ))
10304   (set (reg:SI VFPCC_REGNUM)
10305	(unspec:SI [(reg:SI VFPCC_REGNUM)]
10306	 VSBCQ))
10307  ]
10308  "TARGET_HAVE_MVE"
10309  "vsbc.i32\t%q0, %q1, %q2"
10310  [(set_attr "type" "mve_move")
10311   (set_attr "length" "4")])
10312
10313;;
10314;; [vst2q])
10315;;
10316(define_insn "mve_vst2q<mode>"
10317  [(set (match_operand:OI 0 "neon_struct_operand" "=Um")
10318	(unspec:OI [(match_operand:OI 1 "s_register_operand" "w")
10319		    (unspec:MVE_VLD_ST [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
10320	 VST2Q))
10321  ]
10322  "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
10323   || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
10324{
10325   rtx ops[4];
10326   int regno = REGNO (operands[1]);
10327   ops[0] = gen_rtx_REG (TImode, regno);
10328   ops[1] = gen_rtx_REG (TImode, regno + 4);
10329   rtx reg  = operands[0];
10330   while (reg && !REG_P (reg))
10331    reg = XEXP (reg, 0);
10332   gcc_assert (REG_P (reg));
10333   ops[2] = reg;
10334   ops[3] = operands[0];
10335   output_asm_insn ("vst20.<V_sz_elem>\t{%q0, %q1}, [%2]\n\t"
10336		    "vst21.<V_sz_elem>\t{%q0, %q1}, %3", ops);
10337   return "";
10338}
10339  [(set_attr "length" "8")])
10340
10341;;
10342;; [vld2q])
10343;;
10344(define_insn "mve_vld2q<mode>"
10345  [(set (match_operand:OI 0 "s_register_operand" "=w")
10346	(unspec:OI [(match_operand:OI 1 "neon_struct_operand" "Um")
10347		    (unspec:MVE_VLD_ST [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
10348	 VLD2Q))
10349  ]
10350  "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
10351   || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
10352{
10353   rtx ops[4];
10354   int regno = REGNO (operands[0]);
10355   ops[0] = gen_rtx_REG (TImode, regno);
10356   ops[1] = gen_rtx_REG (TImode, regno + 4);
10357   rtx reg  = operands[1];
10358   while (reg && !REG_P (reg))
10359    reg = XEXP (reg, 0);
10360   gcc_assert (REG_P (reg));
10361   ops[2] = reg;
10362   ops[3] = operands[1];
10363   output_asm_insn ("vld20.<V_sz_elem>\t{%q0, %q1}, [%2]\n\t"
10364		    "vld21.<V_sz_elem>\t{%q0, %q1}, %3", ops);
10365   return "";
10366}
10367  [(set_attr "length" "8")])
10368
10369;;
10370;; [vld4q])
10371;;
10372(define_insn "mve_vld4q<mode>"
10373  [(set (match_operand:XI 0 "s_register_operand" "=w")
10374	(unspec:XI [(match_operand:XI 1 "neon_struct_operand" "Um")
10375		    (unspec:MVE_VLD_ST [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
10376	 VLD4Q))
10377  ]
10378  "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
10379   || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
10380{
10381   rtx ops[6];
10382   int regno = REGNO (operands[0]);
10383   ops[0] = gen_rtx_REG (TImode, regno);
10384   ops[1] = gen_rtx_REG (TImode, regno+4);
10385   ops[2] = gen_rtx_REG (TImode, regno+8);
10386   ops[3] = gen_rtx_REG (TImode, regno + 12);
10387   rtx reg  = operands[1];
10388   while (reg && !REG_P (reg))
10389    reg = XEXP (reg, 0);
10390   gcc_assert (REG_P (reg));
10391   ops[4] = reg;
10392   ops[5] = operands[1];
10393   output_asm_insn ("vld40.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
10394		    "vld41.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
10395		    "vld42.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
10396		    "vld43.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, %5", ops);
10397   return "";
10398}
10399  [(set_attr "length" "16")])
10400;;
10401;; [vgetq_lane_u, vgetq_lane_s, vgetq_lane_f])
10402;;
10403(define_insn "mve_vec_extract<mode><V_elem_l>"
10404 [(set (match_operand:<V_elem> 0 "nonimmediate_operand" "=r")
10405   (vec_select:<V_elem>
10406    (match_operand:MVE_VLD_ST 1 "s_register_operand" "w")
10407    (parallel [(match_operand:SI 2 "immediate_operand" "i")])))]
10408  "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
10409   || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
10410{
10411  if (BYTES_BIG_ENDIAN)
10412    {
10413      int elt = INTVAL (operands[2]);
10414      elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
10415      operands[2] = GEN_INT (elt);
10416    }
10417  return "vmov.<V_extr_elem>\t%0, %q1[%c2]";
10418}
10419 [(set_attr "type" "mve_move")])
10420
10421(define_insn "mve_vec_extractv2didi"
10422 [(set (match_operand:DI 0 "nonimmediate_operand" "=r")
10423   (vec_select:DI
10424    (match_operand:V2DI 1 "s_register_operand" "w")
10425    (parallel [(match_operand:SI 2 "immediate_operand" "i")])))]
10426  "TARGET_HAVE_MVE"
10427{
10428  int elt = INTVAL (operands[2]);
10429  if (BYTES_BIG_ENDIAN)
10430    elt = 1 - elt;
10431
10432  if (elt == 0)
10433   return "vmov\t%Q0, %R0, %e1";
10434  else
10435   return "vmov\t%Q0, %R0, %f1";
10436}
10437 [(set_attr "type" "mve_move")])
10438
10439(define_insn "*mve_vec_extract_sext_internal<mode>"
10440 [(set (match_operand:SI 0 "s_register_operand" "=r")
10441   (sign_extend:SI
10442    (vec_select:<V_elem>
10443     (match_operand:MVE_2 1 "s_register_operand" "w")
10444     (parallel [(match_operand:SI 2 "immediate_operand" "i")]))))]
10445  "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
10446   || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
10447{
10448  if (BYTES_BIG_ENDIAN)
10449    {
10450      int elt = INTVAL (operands[2]);
10451      elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
10452      operands[2] = GEN_INT (elt);
10453    }
10454  return "vmov.s<V_sz_elem>\t%0, %q1[%c2]";
10455}
10456 [(set_attr "type" "mve_move")])
10457
10458(define_insn "*mve_vec_extract_zext_internal<mode>"
10459 [(set (match_operand:SI 0 "s_register_operand" "=r")
10460   (zero_extend:SI
10461    (vec_select:<V_elem>
10462     (match_operand:MVE_2 1 "s_register_operand" "w")
10463     (parallel [(match_operand:SI 2 "immediate_operand" "i")]))))]
10464  "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
10465   || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
10466{
10467  if (BYTES_BIG_ENDIAN)
10468    {
10469      int elt = INTVAL (operands[2]);
10470      elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
10471      operands[2] = GEN_INT (elt);
10472    }
10473  return "vmov.u<V_sz_elem>\t%0, %q1[%c2]";
10474}
10475 [(set_attr "type" "mve_move")])
10476
10477;;
10478;; [vsetq_lane_u, vsetq_lane_s, vsetq_lane_f])
10479;;
10480(define_insn "mve_vec_set<mode>_internal"
10481 [(set (match_operand:VQ2 0 "s_register_operand" "=w")
10482       (vec_merge:VQ2
10483	(vec_duplicate:VQ2
10484	  (match_operand:<V_elem> 1 "nonimmediate_operand" "r"))
10485	(match_operand:VQ2 3 "s_register_operand" "0")
10486	(match_operand:SI 2 "immediate_operand" "i")))]
10487  "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
10488   || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
10489{
10490  int elt = ffs ((int) INTVAL (operands[2])) - 1;
10491  if (BYTES_BIG_ENDIAN)
10492    elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
10493  operands[2] = GEN_INT (elt);
10494
10495  return "vmov.<V_sz_elem>\t%q0[%c2], %1";
10496}
10497 [(set_attr "type" "mve_move")])
10498
10499(define_insn "mve_vec_setv2di_internal"
10500 [(set (match_operand:V2DI 0 "s_register_operand" "=w")
10501       (vec_merge:V2DI
10502	(vec_duplicate:V2DI
10503	  (match_operand:DI 1 "nonimmediate_operand" "r"))
10504	(match_operand:V2DI 3 "s_register_operand" "0")
10505	(match_operand:SI 2 "immediate_operand" "i")))]
10506 "TARGET_HAVE_MVE"
10507{
10508  int elt = ffs ((int) INTVAL (operands[2])) - 1;
10509  if (BYTES_BIG_ENDIAN)
10510    elt = 1 - elt;
10511
10512  if (elt == 0)
10513   return "vmov\t%e0, %Q1, %R1";
10514  else
10515   return "vmov\t%f0, %J1, %K1";
10516}
10517 [(set_attr "type" "mve_move")])
10518
10519;;
10520;; [uqrshll_di]
10521;;
10522(define_insn "mve_uqrshll_sat<supf>_di"
10523  [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
10524	(unspec:DI [(match_operand:DI 1 "arm_low_register_operand" "0")
10525		    (match_operand:SI 2 "register_operand" "r")]
10526	 UQRSHLLQ))]
10527  "TARGET_HAVE_MVE"
10528  "uqrshll%?\\t%Q1, %R1, #<supf>, %2"
10529  [(set_attr "predicable" "yes")])
10530
10531;;
10532;; [sqrshrl_di]
10533;;
10534(define_insn "mve_sqrshrl_sat<supf>_di"
10535  [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
10536	(unspec:DI [(match_operand:DI 1 "arm_low_register_operand" "0")
10537		    (match_operand:SI 2 "register_operand" "r")]
10538	 SQRSHRLQ))]
10539  "TARGET_HAVE_MVE"
10540  "sqrshrl%?\\t%Q1, %R1, #<supf>, %2"
10541  [(set_attr "predicable" "yes")])
10542
10543;;
10544;; [uqrshl_si]
10545;;
10546(define_insn "mve_uqrshl_si"
10547  [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
10548	(unspec:SI [(match_operand:SI 1 "arm_general_register_operand" "0")
10549		    (match_operand:SI 2 "register_operand" "r")]
10550	 UQRSHL))]
10551  "TARGET_HAVE_MVE"
10552  "uqrshl%?\\t%1, %2"
10553  [(set_attr "predicable" "yes")])
10554
10555;;
10556;; [sqrshr_si]
10557;;
10558(define_insn "mve_sqrshr_si"
10559  [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
10560	(unspec:SI [(match_operand:SI 1 "arm_general_register_operand" "0")
10561		    (match_operand:SI 2 "register_operand" "r")]
10562	 SQRSHR))]
10563  "TARGET_HAVE_MVE"
10564  "sqrshr%?\\t%1, %2"
10565  [(set_attr "predicable" "yes")])
10566
10567;;
10568;; [uqshll_di]
10569;;
10570(define_insn "mve_uqshll_di"
10571  [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
10572	(us_ashift:DI (match_operand:DI 1 "arm_low_register_operand" "0")
10573		      (match_operand:SI 2 "immediate_operand" "Pg")))]
10574  "TARGET_HAVE_MVE"
10575  "uqshll%?\\t%Q1, %R1, %2"
10576  [(set_attr "predicable" "yes")])
10577
10578;;
10579;; [urshrl_di]
10580;;
10581(define_insn "mve_urshrl_di"
10582  [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
10583	(unspec:DI [(match_operand:DI 1 "arm_low_register_operand" "0")
10584		    (match_operand:SI 2 "immediate_operand" "Pg")]
10585	 URSHRL))]
10586  "TARGET_HAVE_MVE"
10587  "urshrl%?\\t%Q1, %R1, %2"
10588  [(set_attr "predicable" "yes")])
10589
10590;;
10591;; [uqshl_si]
10592;;
10593(define_insn "mve_uqshl_si"
10594  [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
10595	(us_ashift:SI (match_operand:SI 1 "arm_general_register_operand" "0")
10596		      (match_operand:SI 2 "immediate_operand" "Pg")))]
10597  "TARGET_HAVE_MVE"
10598  "uqshl%?\\t%1, %2"
10599  [(set_attr "predicable" "yes")])
10600
10601;;
10602;; [urshr_si]
10603;;
10604(define_insn "mve_urshr_si"
10605  [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
10606	(unspec:SI [(match_operand:SI 1 "arm_general_register_operand" "0")
10607		    (match_operand:SI 2 "immediate_operand" "Pg")]
10608	 URSHR))]
10609  "TARGET_HAVE_MVE"
10610  "urshr%?\\t%1, %2"
10611  [(set_attr "predicable" "yes")])
10612
10613;;
10614;; [sqshl_si]
10615;;
10616(define_insn "mve_sqshl_si"
10617  [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
10618	(ss_ashift:SI (match_operand:DI 1 "arm_general_register_operand" "0")
10619		      (match_operand:SI 2 "immediate_operand" "Pg")))]
10620  "TARGET_HAVE_MVE"
10621  "sqshl%?\\t%1, %2"
10622  [(set_attr "predicable" "yes")])
10623
10624;;
10625;; [srshr_si]
10626;;
10627(define_insn "mve_srshr_si"
10628  [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
10629	(unspec:SI [(match_operand:DI 1 "arm_general_register_operand" "0")
10630		    (match_operand:SI 2 "immediate_operand" "Pg")]
10631	 SRSHR))]
10632  "TARGET_HAVE_MVE"
10633  "srshr%?\\t%1, %2"
10634  [(set_attr "predicable" "yes")])
10635
10636;;
10637;; [srshrl_di]
10638;;
10639(define_insn "mve_srshrl_di"
10640  [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
10641	(unspec:DI [(match_operand:DI 1 "arm_low_register_operand" "0")
10642		    (match_operand:SI 2 "immediate_operand" "Pg")]
10643	 SRSHRL))]
10644  "TARGET_HAVE_MVE"
10645  "srshrl%?\\t%Q1, %R1, %2"
10646  [(set_attr "predicable" "yes")])
10647
10648;;
10649;; [sqshll_di]
10650;;
10651(define_insn "mve_sqshll_di"
10652  [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
10653	(ss_ashift:DI (match_operand:DI 1 "arm_low_register_operand" "0")
10654		      (match_operand:SI 2 "immediate_operand" "Pg")))]
10655  "TARGET_HAVE_MVE"
10656  "sqshll%?\\t%Q1, %R1, %2"
10657  [(set_attr "predicable" "yes")])
10658
10659;;
10660;; [vshlcq_m_u vshlcq_m_s]
10661;;
10662(define_expand "mve_vshlcq_m_vec_<supf><mode>"
10663 [(match_operand:MVE_2 0 "s_register_operand")
10664  (match_operand:MVE_2 1 "s_register_operand")
10665  (match_operand:SI 2 "s_register_operand")
10666  (match_operand:SI 3 "mve_imm_32")
10667  (match_operand:HI 4 "vpr_register_operand")
10668  (unspec:MVE_2 [(const_int 0)] VSHLCQ_M)]
10669 "TARGET_HAVE_MVE"
10670{
10671  rtx ignore_wb = gen_reg_rtx (SImode);
10672  emit_insn (gen_mve_vshlcq_m_<supf><mode> (operands[0], ignore_wb, operands[1],
10673					    operands[2], operands[3],
10674					    operands[4]));
10675  DONE;
10676})
10677
10678(define_expand "mve_vshlcq_m_carry_<supf><mode>"
10679 [(match_operand:SI 0 "s_register_operand")
10680  (match_operand:MVE_2 1 "s_register_operand")
10681  (match_operand:SI 2 "s_register_operand")
10682  (match_operand:SI 3 "mve_imm_32")
10683  (match_operand:HI 4 "vpr_register_operand")
10684  (unspec:MVE_2 [(const_int 0)] VSHLCQ_M)]
10685 "TARGET_HAVE_MVE"
10686{
10687  rtx ignore_vec = gen_reg_rtx (<MODE>mode);
10688  emit_insn (gen_mve_vshlcq_m_<supf><mode> (ignore_vec, operands[0],
10689					    operands[1], operands[2],
10690					    operands[3], operands[4]));
10691  DONE;
10692})
10693
10694(define_insn "mve_vshlcq_m_<supf><mode>"
10695 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
10696       (unspec:MVE_2 [(match_operand:MVE_2 2 "s_register_operand" "0")
10697		      (match_operand:SI 3 "s_register_operand" "1")
10698		      (match_operand:SI 4 "mve_imm_32" "Rf")
10699		      (match_operand:HI 5 "vpr_register_operand" "Up")]
10700	VSHLCQ_M))
10701  (set (match_operand:SI  1 "s_register_operand" "=r")
10702       (unspec:SI [(match_dup 2)
10703		   (match_dup 3)
10704		   (match_dup 4)
10705		   (match_dup 5)]
10706	VSHLCQ_M))
10707 ]
10708 "TARGET_HAVE_MVE"
10709 "vpst\;vshlct\t%q0, %1, %4"
10710 [(set_attr "type" "mve_move")
10711  (set_attr "length" "8")])
10712
10713;; CDE instructions on MVE registers.
10714
10715(define_insn "arm_vcx1qv16qi"
10716  [(set (match_operand:V16QI 0 "register_operand" "=t")
10717	(unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
10718			   (match_operand:SI 2 "const_int_mve_cde1_operand" "i")]
10719	 UNSPEC_VCDE))]
10720  "TARGET_CDE && TARGET_HAVE_MVE"
10721  "vcx1\\tp%c1, %q0, #%c2"
10722  [(set_attr "type" "coproc")]
10723)
10724
10725(define_insn "arm_vcx1qav16qi"
10726  [(set (match_operand:V16QI 0 "register_operand" "=t")
10727	(unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
10728			    (match_operand:V16QI 2 "register_operand" "0")
10729			    (match_operand:SI 3 "const_int_mve_cde1_operand" "i")]
10730	 UNSPEC_VCDEA))]
10731  "TARGET_CDE && TARGET_HAVE_MVE"
10732  "vcx1a\\tp%c1, %q0, #%c3"
10733  [(set_attr "type" "coproc")]
10734)
10735
10736(define_insn "arm_vcx2qv16qi"
10737  [(set (match_operand:V16QI 0 "register_operand" "=t")
10738	(unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
10739			  (match_operand:V16QI 2 "register_operand" "t")
10740			  (match_operand:SI 3 "const_int_mve_cde2_operand" "i")]
10741	 UNSPEC_VCDE))]
10742  "TARGET_CDE && TARGET_HAVE_MVE"
10743  "vcx2\\tp%c1, %q0, %q2, #%c3"
10744  [(set_attr "type" "coproc")]
10745)
10746
10747(define_insn "arm_vcx2qav16qi"
10748  [(set (match_operand:V16QI 0 "register_operand" "=t")
10749	(unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
10750			  (match_operand:V16QI 2 "register_operand" "0")
10751			  (match_operand:V16QI 3 "register_operand" "t")
10752			  (match_operand:SI 4 "const_int_mve_cde2_operand" "i")]
10753	 UNSPEC_VCDEA))]
10754  "TARGET_CDE && TARGET_HAVE_MVE"
10755  "vcx2a\\tp%c1, %q0, %q3, #%c4"
10756  [(set_attr "type" "coproc")]
10757)
10758
10759(define_insn "arm_vcx3qv16qi"
10760  [(set (match_operand:V16QI 0 "register_operand" "=t")
10761	(unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
10762			  (match_operand:V16QI 2 "register_operand" "t")
10763			  (match_operand:V16QI 3 "register_operand" "t")
10764			  (match_operand:SI 4 "const_int_mve_cde3_operand" "i")]
10765	 UNSPEC_VCDE))]
10766  "TARGET_CDE && TARGET_HAVE_MVE"
10767  "vcx3\\tp%c1, %q0, %q2, %q3, #%c4"
10768  [(set_attr "type" "coproc")]
10769)
10770
10771(define_insn "arm_vcx3qav16qi"
10772  [(set (match_operand:V16QI 0 "register_operand" "=t")
10773	(unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
10774			  (match_operand:V16QI 2 "register_operand" "0")
10775			  (match_operand:V16QI 3 "register_operand" "t")
10776			  (match_operand:V16QI 4 "register_operand" "t")
10777			  (match_operand:SI 5 "const_int_mve_cde3_operand" "i")]
10778	 UNSPEC_VCDEA))]
10779  "TARGET_CDE && TARGET_HAVE_MVE"
10780  "vcx3a\\tp%c1, %q0, %q3, %q4, #%c5"
10781  [(set_attr "type" "coproc")]
10782)
10783
10784(define_insn "arm_vcx1q<a>_p_v16qi"
10785  [(set (match_operand:V16QI 0 "register_operand" "=t")
10786	(unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
10787			   (match_operand:V16QI 2 "register_operand" "0")
10788			   (match_operand:SI 3 "const_int_mve_cde1_operand" "i")
10789			   (match_operand:HI 4 "vpr_register_operand" "Up")]
10790	 CDE_VCX))]
10791  "TARGET_CDE && TARGET_HAVE_MVE"
10792  "vpst\;vcx1<a>t\\tp%c1, %q0, #%c3"
10793  [(set_attr "type" "coproc")
10794   (set_attr "length" "8")]
10795)
10796
10797(define_insn "arm_vcx2q<a>_p_v16qi"
10798  [(set (match_operand:V16QI 0 "register_operand" "=t")
10799	(unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
10800			  (match_operand:V16QI 2 "register_operand" "0")
10801			  (match_operand:V16QI 3 "register_operand" "t")
10802			  (match_operand:SI 4 "const_int_mve_cde2_operand" "i")
10803			  (match_operand:HI 5 "vpr_register_operand" "Up")]
10804	 CDE_VCX))]
10805  "TARGET_CDE && TARGET_HAVE_MVE"
10806  "vpst\;vcx2<a>t\\tp%c1, %q0, %q3, #%c4"
10807  [(set_attr "type" "coproc")
10808   (set_attr "length" "8")]
10809)
10810
10811(define_insn "arm_vcx3q<a>_p_v16qi"
10812  [(set (match_operand:V16QI 0 "register_operand" "=t")
10813	(unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
10814			  (match_operand:V16QI 2 "register_operand" "0")
10815			  (match_operand:V16QI 3 "register_operand" "t")
10816			  (match_operand:V16QI 4 "register_operand" "t")
10817			  (match_operand:SI 5 "const_int_mve_cde3_operand" "i")
10818			  (match_operand:HI 6 "vpr_register_operand" "Up")]
10819	 CDE_VCX))]
10820  "TARGET_CDE && TARGET_HAVE_MVE"
10821  "vpst\;vcx3<a>t\\tp%c1, %q0, %q3, %q4, #%c5"
10822  [(set_attr "type" "coproc")
10823   (set_attr "length" "8")]
10824)
10825