1 ;; Arm M-profile Vector Extension Machine Description
2 ;; Copyright (C) 2019-2023 Free Software Foundation, Inc.
4 ;; This file is part of GCC.
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)
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.
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/>.
20 (define_insn "*mve_mov<mode>"
21 [(set (match_operand:MVE_types 0 "nonimmediate_operand" "=w,w,r,w , w, r,Ux,w")
22 (match_operand:MVE_types 1 "general_operand" " w,r,w,DnDm,UxUi,r,w, Ul"))]
23 "TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT"
25 switch (which_alternative)
28 return "vmov\t%q0, %q1";
31 return "vmov\t%e0, %Q1, %R1 %@ <mode>\;vmov\t%f0, %J1, %K1";
34 return "vmov\t%Q0, %R0, %e1 %@ <mode>\;vmov\t%J0, %K0, %f1";
36 case 3: /* [w,DnDm]. */
40 is_valid = simd_immediate_valid_for_move (operands[1], <MODE>mode,
41 &operands[1], &width);
43 gcc_assert (is_valid);
46 return "vmov.f32\t%q0, %1 %@ <mode>";
49 const int templ_size = 40;
50 static char templ[templ_size];
51 if (snprintf (templ, templ_size,
52 "vmov.i%d\t%%q0, %%x1 %%@ <mode>", width)
59 case 4: /* [w,UxUi]. */
60 if (<MODE>mode == V2DFmode || <MODE>mode == V2DImode
61 || <MODE>mode == TImode)
62 return "vldrw.u32\t%q0, %E1";
64 return "vldr<V_sz_elem1>.<V_sz_elem>\t%q0, %E1";
67 return output_move_quad (operands);
70 if (<MODE>mode == V2DFmode || <MODE>mode == V2DImode
71 || <MODE>mode == TImode)
72 return "vstrw.32\t%q1, %E0";
74 return "vstr<V_sz_elem1>.<V_sz_elem>\t%q1, %E0";
77 return output_move_neon (operands);
84 [(set_attr "type" "mve_move,mve_move,mve_move,mve_move,mve_load,multiple,mve_store,mve_load")
85 (set_attr "length" "4,8,8,4,4,8,4,8")
86 (set_attr "thumb2_pool_range" "*,*,*,*,1018,*,*,*")
87 (set_attr "neg_pool_range" "*,*,*,*,996,*,*,*")])
89 (define_insn "*mve_vdup<mode>"
90 [(set (match_operand:MVE_vecs 0 "s_register_operand" "=w")
91 (vec_duplicate:MVE_vecs
92 (match_operand:<V_elem> 1 "s_register_operand" "r")))]
93 "TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT"
94 "vdup.<V_sz_elem>\t%q0, %1"
95 [(set_attr "length" "4")
96 (set_attr "type" "mve_move")])
101 (define_insn "mve_vst4q<mode>"
102 [(set (match_operand:XI 0 "mve_struct_operand" "=Ug")
103 (unspec:XI [(match_operand:XI 1 "s_register_operand" "w")
104 (unspec:MVE_VLD_ST [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
110 int regno = REGNO (operands[1]);
111 ops[0] = gen_rtx_REG (TImode, regno);
112 ops[1] = gen_rtx_REG (TImode, regno+4);
113 ops[2] = gen_rtx_REG (TImode, regno+8);
114 ops[3] = gen_rtx_REG (TImode, regno+12);
115 rtx reg = operands[0];
116 while (reg && !REG_P (reg))
118 gcc_assert (REG_P (reg));
120 ops[5] = operands[0];
121 /* Here in first three instructions data is stored to ops[4]'s location but
122 in the fourth instruction data is stored to operands[0], this is to
123 support the writeback. */
124 output_asm_insn ("vst40.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
125 "vst41.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
126 "vst42.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
127 "vst43.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, %5", ops);
130 [(set_attr "length" "16")])
140 (define_insn "@mve_<mve_insn>q_f<mode>"
142 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
143 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
146 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
147 "<mve_mnemo>.f%#<V_sz_elem>\t%q0, %q1"
148 [(set_attr "type" "mve_move")
154 (define_insn "@mve_<mve_insn>q_f<mode>"
156 (set (match_operand:MVE_0 0 "s_register_operand" "=&w")
157 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")]
158 MVE_FP_VREV64Q_ONLY))
160 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
161 "<mve_insn>.%#<V_sz_elem>\t%q0, %q1"
162 [(set_attr "type" "mve_move")
169 (define_insn "mve_v<absneg_str>q_f<mode>"
171 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
172 (ABSNEG:MVE_0 (match_operand:MVE_0 1 "s_register_operand" "w")))
174 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
175 "v<absneg_str>.f%#<V_sz_elem>\t%q0, %q1"
176 [(set_attr "type" "mve_move")
182 (define_insn "@mve_<mve_insn>q_n_f<mode>"
184 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
185 (unspec:MVE_0 [(match_operand:<V_elem> 1 "s_register_operand" "r")]
186 MVE_FP_N_VDUPQ_ONLY))
188 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
189 "<mve_insn>.%#<V_sz_elem>\t%q0, %1"
190 [(set_attr "type" "mve_move")
196 (define_insn "@mve_<mve_insn>q_f<mode>"
198 (set (match_operand:MVE_V8HF 0 "s_register_operand" "=w")
199 (unspec:MVE_V8HF [(match_operand:MVE_V8HF 1 "s_register_operand" "w")]
200 MVE_FP_VREV32Q_ONLY))
202 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
203 "<mve_insn>.<V_sz_elem>\t%q0, %q1"
204 [(set_attr "type" "mve_move")
209 (define_insn "mve_vcvttq_f32_f16v4sf"
211 (set (match_operand:V4SF 0 "s_register_operand" "=w")
212 (unspec:V4SF [(match_operand:V8HF 1 "s_register_operand" "w")]
215 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
216 "vcvtt.f32.f16\t%q0, %q1"
217 [(set_attr "type" "mve_move")
223 (define_insn "mve_vcvtbq_f32_f16v4sf"
225 (set (match_operand:V4SF 0 "s_register_operand" "=w")
226 (unspec:V4SF [(match_operand:V8HF 1 "s_register_operand" "w")]
229 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
230 "vcvtb.f32.f16\t%q0, %q1"
231 [(set_attr "type" "mve_move")
235 ;; [vcvtq_to_f_s, vcvtq_to_f_u])
237 (define_insn "mve_vcvtq_to_f_<supf><mode>"
239 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
240 (unspec:MVE_0 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
243 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
244 "vcvt.f%#<V_sz_elem>.<supf>%#<V_sz_elem>\t%q0, %q1"
245 [(set_attr "type" "mve_move")
249 ;; [vrev64q_u, vrev64q_s])
251 (define_insn "@mve_<mve_insn>q_<supf><mode>"
253 (set (match_operand:MVE_2 0 "s_register_operand" "=&w")
254 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")]
258 "<mve_insn>.%#<V_sz_elem>\t%q0, %q1"
259 [(set_attr "type" "mve_move")
263 ;; [vcvtq_from_f_s, vcvtq_from_f_u])
265 (define_insn "mve_vcvtq_from_f_<supf><mode>"
267 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
268 (unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
271 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
272 "vcvt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q1"
273 [(set_attr "type" "mve_move")
280 (define_insn "mve_v<absneg_str>q_s<mode>"
282 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
283 (ABSNEG:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w")))
286 "v<absneg_str>.s%#<V_sz_elem>\t%q0, %q1"
287 [(set_attr "type" "mve_move")
291 ;; [vmvnq_u, vmvnq_s])
293 (define_insn "mve_vmvnq_u<mode>"
295 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
296 (not:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w")))
300 [(set_attr "type" "mve_move")
302 (define_expand "mve_vmvnq_s<mode>"
304 (set (match_operand:MVE_2 0 "s_register_operand")
305 (not:MVE_2 (match_operand:MVE_2 1 "s_register_operand")))
311 ;; [vdupq_n_u, vdupq_n_s])
313 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
315 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
316 (unspec:MVE_2 [(match_operand:<V_elem> 1 "s_register_operand" "r")]
320 "<mve_insn>.%#<V_sz_elem>\t%q0, %1"
321 [(set_attr "type" "mve_move")
325 ;; [vclzq_u, vclzq_s])
327 (define_insn "@mve_vclzq_s<mode>"
329 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
330 (clz:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w")))
333 "vclz.i%#<V_sz_elem>\t%q0, %q1"
334 [(set_attr "type" "mve_move")
336 (define_expand "mve_vclzq_u<mode>"
338 (set (match_operand:MVE_2 0 "s_register_operand")
339 (clz:MVE_2 (match_operand:MVE_2 1 "s_register_operand")))
349 (define_insn "@mve_<mve_insn>q_<supf><mode>"
351 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
352 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")]
356 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %q1"
357 [(set_attr "type" "mve_move")
361 ;; [vaddvq_s, vaddvq_u])
363 (define_insn "@mve_<mve_insn>q_<supf><mode>"
365 (set (match_operand:SI 0 "s_register_operand" "=Te")
366 (unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")]
370 "<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q1"
371 [(set_attr "type" "mve_move")
375 ;; [vrev32q_u, vrev32q_s])
377 (define_insn "@mve_<mve_insn>q_<supf><mode>"
379 (set (match_operand:MVE_3 0 "s_register_operand" "=w")
380 (unspec:MVE_3 [(match_operand:MVE_3 1 "s_register_operand" "w")]
384 "<mve_insn>.%#<V_sz_elem>\t%q0, %q1"
385 [(set_attr "type" "mve_move")
389 ;; [vmovlbq_s, vmovlbq_u]
390 ;; [vmovltq_u, vmovltq_s]
392 (define_insn "@mve_<mve_insn>q_<supf><mode>"
394 (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
395 (unspec:<V_double_width> [(match_operand:MVE_3 1 "s_register_operand" "w")]
399 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %q1"
400 [(set_attr "type" "mve_move")
404 ;; [vcvtpq_s, vcvtpq_u])
406 (define_insn "mve_vcvtpq_<supf><mode>"
408 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
409 (unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
412 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
413 "vcvtp.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q1"
414 [(set_attr "type" "mve_move")
418 ;; [vcvtnq_s, vcvtnq_u])
420 (define_insn "mve_vcvtnq_<supf><mode>"
422 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
423 (unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
426 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
427 "vcvtn.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q1"
428 [(set_attr "type" "mve_move")
432 ;; [vcvtmq_s, vcvtmq_u])
434 (define_insn "mve_vcvtmq_<supf><mode>"
436 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
437 (unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
440 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
441 "vcvtm.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q1"
442 [(set_attr "type" "mve_move")
446 ;; [vcvtaq_u, vcvtaq_s])
448 (define_insn "mve_vcvtaq_<supf><mode>"
450 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
451 (unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")]
454 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
455 "vcvta.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q1"
456 [(set_attr "type" "mve_move")
460 ;; [vmvnq_n_u, vmvnq_n_s])
462 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
464 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
465 (unspec:MVE_5 [(match_operand:<V_elem> 1 "immediate_operand" "i")]
469 "<mve_insn>.i%#<V_sz_elem>\t%q0, %1"
470 [(set_attr "type" "mve_move")
474 ;; [vrev16q_u, vrev16q_s])
476 (define_insn "@mve_<mve_insn>q_<supf><mode>"
478 (set (match_operand:MVE_V16QI 0 "s_register_operand" "=w")
479 (unspec:MVE_V16QI [(match_operand:MVE_V16QI 1 "s_register_operand" "w")]
483 "<mve_insn>.<V_sz_elem>\t%q0, %q1"
484 [(set_attr "type" "mve_move")
488 ;; [vaddlvq_s vaddlvq_u])
490 (define_insn "@mve_<mve_insn>q_<supf>v4si"
492 (set (match_operand:DI 0 "s_register_operand" "=r")
493 (unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")]
497 "<mve_insn>.<supf>32\t%Q0, %R0, %q1"
498 [(set_attr "type" "mve_move")
502 ;; [vctp8q vctp16q vctp32q vctp64q])
504 (define_insn "mve_vctp<MVE_vctp>q<MVE_vpred>"
506 (set (match_operand:MVE_7 0 "vpr_register_operand" "=Up")
507 (unspec:MVE_7 [(match_operand:SI 1 "s_register_operand" "r")]
511 "vctp.<MVE_vctp>\t%1"
512 [(set_attr "type" "mve_move")
518 (define_insn "mve_vpnotv16bi"
520 (set (match_operand:V16BI 0 "vpr_register_operand" "=Up")
521 (unspec:V16BI [(match_operand:V16BI 1 "vpr_register_operand" "0")]
526 [(set_attr "type" "mve_move")
532 (define_insn "@mve_<mve_insn>q_n_f<mode>"
534 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
535 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
536 (match_operand:SI 2 "s_register_operand" "r")]
539 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
540 "<mve_insn>.<V_sz_elem>\t%q0, %q1, %2"
541 [(set_attr "type" "mve_move")
545 ;; [vcvtq_n_to_f_s, vcvtq_n_to_f_u])
547 (define_insn "mve_vcvtq_n_to_f_<supf><mode>"
549 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
550 (unspec:MVE_0 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")
551 (match_operand:SI 2 "<MVE_pred2>" "<MVE_constraint2>")]
554 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
555 "vcvt.f<V_sz_elem>.<supf><V_sz_elem>\t%q0, %q1, %2"
556 [(set_attr "type" "mve_move")
561 (define_insn "@mve_<mve_insn>q_f<mode>"
563 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
564 (unspec:MVE_0 [(match_operand:DI 1 "s_register_operand" "r")
565 (match_operand:DI 2 "s_register_operand" "r")]
568 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
569 "vmov %q0[2], %q0[0], %Q1, %Q2\;vmov %q0[3], %q0[1], %R1, %R2"
570 [(set_attr "type" "mve_move")
571 (set_attr "length""8")])
574 ;; [vcreateq_u, vcreateq_s])
576 (define_insn "@mve_<mve_insn>q_<supf><mode>"
578 (set (match_operand:MVE_1 0 "s_register_operand" "=w")
579 (unspec:MVE_1 [(match_operand:DI 1 "s_register_operand" "r")
580 (match_operand:DI 2 "s_register_operand" "r")]
584 "vmov %q0[2], %q0[0], %Q1, %Q2\;vmov %q0[3], %q0[1], %R1, %R2"
585 [(set_attr "type" "mve_move")
586 (set_attr "length""8")])
589 ;; [vrshrq_n_s, vrshrq_n_u]
590 ;; [vshrq_n_s, vshrq_n_u]
592 ;; Version that takes an immediate as operand 2.
593 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
595 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
596 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
597 (match_operand:SI 2 "<MVE_pred2>" "<MVE_constraint2>")]
601 "<mve_insn>.<supf><V_sz_elem>\t%q0, %q1, %2"
602 [(set_attr "type" "mve_move")
605 ;; Versions that take constant vectors as operand 2 (with all elements
607 (define_insn "mve_vshrq_n_s<mode>_imm"
609 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
610 (ashiftrt:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w")
611 (match_operand:MVE_2 2 "imm_for_neon_rshift_operand" "i")))
615 return neon_output_shift_immediate ("vshr", 's', &operands[2],
617 VALID_NEON_QREG_MODE (<MODE>mode),
620 [(set_attr "type" "mve_move")
622 (define_insn "mve_vshrq_n_u<mode>_imm"
624 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
625 (lshiftrt:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w")
626 (match_operand:MVE_2 2 "imm_for_neon_rshift_operand" "i")))
630 return neon_output_shift_immediate ("vshr", 'u', &operands[2],
632 VALID_NEON_QREG_MODE (<MODE>mode),
635 [(set_attr "type" "mve_move")
639 ;; [vcvtq_n_from_f_s, vcvtq_n_from_f_u])
641 (define_insn "mve_vcvtq_n_from_f_<supf><mode>"
643 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
644 (unspec:MVE_5 [(match_operand:<MVE_CNVT> 1 "s_register_operand" "w")
645 (match_operand:SI 2 "<MVE_pred2>" "<MVE_constraint2>")]
648 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
649 "vcvt.<supf><V_sz_elem>.f<V_sz_elem>\t%q0, %q1, %2"
650 [(set_attr "type" "mve_move")
656 (define_insn "@mve_<mve_insn>q_p_<supf>v4si"
658 (set (match_operand:DI 0 "s_register_operand" "=r")
659 (unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
660 (match_operand:V4BI 2 "vpr_register_operand" "Up")]
664 "vpst\;<mve_insn>t.<supf>32\t%Q0, %R0, %q1"
665 [(set_attr "type" "mve_move")
666 (set_attr "length""8")])
669 ;; [vcmpneq_, vcmpcsq_, vcmpeqq_, vcmpgeq_, vcmpgtq_, vcmphiq_, vcmpleq_, vcmpltq_])
671 (define_insn "@mve_vcmp<mve_cmp_op>q_<mode>"
673 (set (match_operand:<MVE_VPRED> 0 "vpr_register_operand" "=Up")
674 (MVE_COMPARISONS:<MVE_VPRED> (match_operand:MVE_2 1 "s_register_operand" "w")
675 (match_operand:MVE_2 2 "s_register_operand" "w")))
678 "vcmp.<mve_cmp_type>%#<V_sz_elem>\t<mve_cmp_op>, %q1, %q2"
679 [(set_attr "type" "mve_move")
683 ;; [vcmpcsq_n_, vcmpeqq_n_, vcmpgeq_n_, vcmpgtq_n_, vcmphiq_n_, vcmpleq_n_, vcmpltq_n_, vcmpneq_n_])
685 (define_insn "@mve_vcmp<mve_cmp_op>q_n_<mode>"
687 (set (match_operand:<MVE_VPRED> 0 "vpr_register_operand" "=Up")
688 (MVE_COMPARISONS:<MVE_VPRED>
689 (match_operand:MVE_2 1 "s_register_operand" "w")
690 (vec_duplicate:MVE_2 (match_operand:<V_elem> 2 "s_register_operand" "r"))))
693 "vcmp.<mve_cmp_type>%#<V_sz_elem> <mve_cmp_op>, %q1, %2"
694 [(set_attr "type" "mve_move")
698 ;; [vshlq_s, vshlq_u])
702 ;; [vabdq_s, vabdq_u]
703 ;; [vhaddq_s, vhaddq_u]
704 ;; [vhsubq_s, vhsubq_u]
705 ;; [vmulhq_s, vmulhq_u]
706 ;; [vqaddq_u, vqaddq_s]
709 ;; [vqrshlq_s, vqrshlq_u]
710 ;; [vqshlq_s, vqshlq_u]
711 ;; [vqsubq_u, vqsubq_s]
712 ;; [vrhaddq_s, vrhaddq_u]
713 ;; [vrmulhq_s, vrmulhq_u]
714 ;; [vrshlq_s, vrshlq_u]
716 (define_insn "@mve_<mve_insn>q_<supf><mode>"
718 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
719 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
720 (match_operand:MVE_2 2 "s_register_operand" "w")]
724 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
725 [(set_attr "type" "mve_move")
729 ;; [vaddq_n_s, vaddq_n_u]
730 ;; [vsubq_n_s, vsubq_n_u]
731 ;; [vmulq_n_s, vmulq_n_u]
733 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
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:<V_elem> 2 "s_register_operand" "r")]
741 "<mve_insn>.i%#<V_sz_elem>\t%q0, %q1, %2"
742 [(set_attr "type" "mve_move")
746 ;; [vaddvaq_s, vaddvaq_u])
748 (define_insn "@mve_<mve_insn>q_<supf><mode>"
750 (set (match_operand:SI 0 "s_register_operand" "=Te")
751 (unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
752 (match_operand:MVE_2 2 "s_register_operand" "w")]
756 "<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q2"
757 [(set_attr "type" "mve_move")
761 ;; [vaddvq_p_u, vaddvq_p_s])
763 (define_insn "@mve_<mve_insn>q_p_<supf><mode>"
765 (set (match_operand:SI 0 "s_register_operand" "=Te")
766 (unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
767 (match_operand:<MVE_VPRED> 2 "vpr_register_operand" "Up")]
771 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%0, %q1"
772 [(set_attr "type" "mve_move")
773 (set_attr "length""8")])
776 ;; [vandq_u, vandq_s])
778 ;; signed and unsigned versions are the same: define the unsigned
779 ;; insn, and use an expander for the signed one as we still reference
780 ;; both names from arm_mve.h.
781 ;; We use the same code as in neon.md (TODO: avoid this duplication).
782 (define_insn "mve_vandq_u<mode>"
784 (set (match_operand:MVE_2 0 "s_register_operand" "=w,w")
785 (and:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w,0")
786 (match_operand:MVE_2 2 "neon_inv_logic_op2" "w,DL")))
791 * return neon_output_logic_immediate (\"vand\", &operands[2], <MODE>mode, 1, VALID_NEON_QREG_MODE (<MODE>mode));"
792 [(set_attr "type" "mve_move")
794 (define_expand "mve_vandq_s<mode>"
796 (set (match_operand:MVE_2 0 "s_register_operand")
797 (and:MVE_2 (match_operand:MVE_2 1 "s_register_operand")
798 (match_operand:MVE_2 2 "neon_inv_logic_op2")))
804 ;; [vbicq_s, vbicq_u])
806 (define_insn "mve_vbicq_u<mode>"
808 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
809 (and:MVE_2 (not:MVE_2 (match_operand:MVE_2 2 "s_register_operand" "w"))
810 (match_operand:MVE_2 1 "s_register_operand" "w")))
813 "vbic\t%q0, %q1, %q2"
814 [(set_attr "type" "mve_move")
817 (define_expand "mve_vbicq_s<mode>"
819 (set (match_operand:MVE_2 0 "s_register_operand")
820 (and:MVE_2 (not:MVE_2 (match_operand:MVE_2 2 "s_register_operand"))
821 (match_operand:MVE_2 1 "s_register_operand")))
827 ;; [vbrsrq_n_u, vbrsrq_n_s])
829 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
831 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
832 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
833 (match_operand:SI 2 "s_register_operand" "r")]
837 "<mve_insn>.%#<V_sz_elem>\t%q0, %q1, %2"
838 [(set_attr "type" "mve_move")
842 ;; [vcaddq_rot90_s, vcaddq_rot90_u]
843 ;; [vcaddq_rot270_s, vcaddq_rot270_u]
845 ;; [vhcaddq_rot270_s]
847 (define_insn "@mve_<mve_insn>q<mve_rot>_<supf><mode>"
849 (set (match_operand:MVE_2 0 "s_register_operand" "<earlyclobber_32>")
850 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
851 (match_operand:MVE_2 2 "s_register_operand" "w")]
855 "<mve_insn>.<isu>%#<V_sz_elem>\t%q0, %q1, %q2, #<rot>"
856 [(set_attr "type" "mve_move")
859 ;; Auto vectorizer pattern for int vcadd
860 (define_expand "cadd<rot><mode>3"
861 [(set (match_operand:MVE_2 0 "register_operand")
862 (unspec:MVE_2 [(match_operand:MVE_2 1 "register_operand")
863 (match_operand:MVE_2 2 "register_operand")]
865 "TARGET_HAVE_MVE && !BYTES_BIG_ENDIAN"
869 ;; [veorq_u, veorq_s])
871 (define_insn "mve_veorq_u<mode>"
873 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
874 (xor:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w")
875 (match_operand:MVE_2 2 "s_register_operand" "w")))
878 "veor\t%q0, %q1, %q2"
879 [(set_attr "type" "mve_move")
881 (define_expand "mve_veorq_s<mode>"
883 (set (match_operand:MVE_2 0 "s_register_operand")
884 (xor:MVE_2 (match_operand:MVE_2 1 "s_register_operand")
885 (match_operand:MVE_2 2 "s_register_operand")))
891 ;; [vhaddq_n_u, vhaddq_n_s]
892 ;; [vhsubq_n_u, vhsubq_n_s]
893 ;; [vqaddq_n_s, vqaddq_n_u]
896 ;; [vqsubq_n_s, vqsubq_n_u]
898 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
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:<V_elem> 2 "s_register_operand" "r")]
903 MVE_INT_SU_N_BINARY))
906 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
907 [(set_attr "type" "mve_move")
914 (define_insn "@mve_<mve_insn>q_<supf><mode>"
916 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
917 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
918 (match_operand:MVE_2 2 "s_register_operand" "w")]
922 "<mve_insn>.s%#<V_sz_elem>\t%q0, %q2"
923 [(set_attr "type" "mve_move")
927 ;; [vmaxq_u, vmaxq_s]
928 ;; [vminq_s, vminq_u]
930 (define_insn "mve_<max_min_su_str>q_<max_min_supf><mode>"
932 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
933 (MAX_MIN_SU:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w")
934 (match_operand:MVE_2 2 "s_register_operand" "w")))
937 "<max_min_su_str>.<max_min_supf>%#<V_sz_elem>\t%q0, %q1, %q2"
938 [(set_attr "type" "mve_move")
944 ;; [vmaxvq_u, vmaxvq_s]
946 ;; [vminvq_u, vminvq_s]
948 (define_insn "@mve_<mve_insn>q_<supf><mode>"
950 (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
951 (unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
952 (match_operand:MVE_2 2 "s_register_operand" "w")]
956 "<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q2"
957 [(set_attr "type" "mve_move")
961 ;; [vmladavq_u, vmladavq_s]
966 (define_insn "@mve_<mve_insn>q_<supf><mode>"
968 (set (match_operand:SI 0 "s_register_operand" "=Te")
969 (unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
970 (match_operand:MVE_2 2 "s_register_operand" "w")]
974 "<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q1, %q2"
975 [(set_attr "type" "mve_move")
979 ;; [vmullbq_int_u, vmullbq_int_s]
980 ;; [vmulltq_int_u, vmulltq_int_s]
982 (define_insn "@mve_<mve_insn>q_int_<supf><mode>"
984 (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
985 (unspec:<V_double_width> [(match_operand:MVE_2 1 "s_register_operand" "w")
986 (match_operand:MVE_2 2 "s_register_operand" "w")]
990 "<mve_insn>.<isu>%#<V_sz_elem>\t%q0, %q1, %q2"
991 [(set_attr "type" "mve_move")
995 ;; [vaddq_s, vaddq_u]
996 ;; [vmulq_u, vmulq_s]
997 ;; [vsubq_s, vsubq_u]
999 (define_insn "mve_<mve_addsubmul>q<mode>"
1001 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1002 (MVE_INT_BINARY_RTX:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w")
1003 (match_operand:MVE_2 2 "s_register_operand" "w")))
1006 "<mve_addsubmul>.i%#<V_sz_elem>\t%q0, %q1, %q2"
1007 [(set_attr "type" "mve_move")
1011 ;; [vornq_u, vornq_s])
1013 (define_insn "mve_vornq_s<mode>"
1015 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1016 (ior:MVE_2 (not:MVE_2 (match_operand:MVE_2 2 "s_register_operand" "w"))
1017 (match_operand:MVE_2 1 "s_register_operand" "w")))
1020 "vorn\t%q0, %q1, %q2"
1021 [(set_attr "type" "mve_move")
1024 (define_expand "mve_vornq_u<mode>"
1026 (set (match_operand:MVE_2 0 "s_register_operand")
1027 (ior:MVE_2 (not:MVE_2 (match_operand:MVE_2 2 "s_register_operand"))
1028 (match_operand:MVE_2 1 "s_register_operand")))
1034 ;; [vorrq_s, vorrq_u])
1036 ;; signed and unsigned versions are the same: define the unsigned
1037 ;; insn, and use an expander for the signed one as we still reference
1038 ;; both names from arm_mve.h.
1039 ;; We use the same code as in neon.md (TODO: avoid this duplication).
1040 (define_insn "mve_vorrq_s<mode>"
1042 (set (match_operand:MVE_2 0 "s_register_operand" "=w,w")
1043 (ior:MVE_2 (match_operand:MVE_2 1 "s_register_operand" "w,0")
1044 (match_operand:MVE_2 2 "neon_logic_op2" "w,Dl")))
1049 * return neon_output_logic_immediate (\"vorr\", &operands[2], <MODE>mode, 0, VALID_NEON_QREG_MODE (<MODE>mode));"
1050 [(set_attr "type" "mve_move")
1052 (define_expand "mve_vorrq_u<mode>"
1054 (set (match_operand:MVE_2 0 "s_register_operand")
1055 (ior:MVE_2 (match_operand:MVE_2 1 "s_register_operand")
1056 (match_operand:MVE_2 2 "neon_logic_op2")))
1062 ;; [vqrshlq_n_s, vqrshlq_n_u]
1063 ;; [vrshlq_n_u, vrshlq_n_s]
1065 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
1067 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1068 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1069 (match_operand:SI 2 "s_register_operand" "r")]
1073 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %2"
1074 [(set_attr "type" "mve_move")
1078 ;; [vqshlq_n_s, vqshlq_n_u]
1079 ;; [vshlq_n_u, vshlq_n_s]
1081 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
1083 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1084 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1085 (match_operand:SI 2 "immediate_operand" "i")]
1089 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
1090 [(set_attr "type" "mve_move")
1094 ;; [vqshlq_r_u, vqshlq_r_s]
1095 ;; [vshlq_r_s, vshlq_r_u]
1097 (define_insn "@mve_<mve_insn>q_r_<supf><mode>"
1099 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1100 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1101 (match_operand:SI 2 "s_register_operand" "r")]
1105 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %2"
1106 [(set_attr "type" "mve_move")
1112 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
1114 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1115 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
1116 (match_operand:SI 2 "<MVE_pred>" "<MVE_constraint>")]
1120 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
1121 [(set_attr "type" "mve_move")
1127 (define_insn "@mve_<mve_insn>q_f<mode>"
1129 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1130 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
1131 (match_operand:MVE_0 2 "s_register_operand" "w")]
1134 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1135 "<mve_insn>.f%#<V_sz_elem>\t%q0, %q1, %q2"
1136 [(set_attr "type" "mve_move")
1140 ;; [vaddlvaq_s vaddlvaq_u])
1142 (define_insn "@mve_<mve_insn>q_<supf>v4si"
1144 (set (match_operand:DI 0 "s_register_operand" "=r")
1145 (unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
1146 (match_operand:V4SI 2 "s_register_operand" "w")]
1150 "<mve_insn>.<supf>32\t%Q0, %R0, %q2"
1151 [(set_attr "type" "mve_move")
1159 (define_insn "@mve_<mve_insn>q_n_f<mode>"
1161 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1162 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
1163 (match_operand:<V_elem> 2 "s_register_operand" "r")]
1166 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1167 "<mve_insn>.f%#<V_sz_elem>\t%q0, %q1, %2"
1168 [(set_attr "type" "mve_move")
1174 (define_insn "mve_vandq_f<mode>"
1176 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1177 (and:MVE_0 (match_operand:MVE_0 1 "s_register_operand" "w")
1178 (match_operand:MVE_0 2 "s_register_operand" "w")))
1180 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1181 "vand\t%q0, %q1, %q2"
1182 [(set_attr "type" "mve_move")
1188 (define_insn "mve_vbicq_f<mode>"
1190 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1191 (and:MVE_0 (not:MVE_0 (match_operand:MVE_0 1 "s_register_operand" "w"))
1192 (match_operand:MVE_0 2 "s_register_operand" "w")))
1194 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1195 "vbic\t%q0, %q1, %q2"
1196 [(set_attr "type" "mve_move")
1200 ;; [vcaddq_rot90_f, vcaddq_rot270_f]
1201 ;; [vcmulq, vcmulq_rot90, vcmulq_rot180, vcmulq_rot270]
1203 (define_insn "@mve_<mve_insn>q<mve_rot>_f<mode>"
1205 (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
1206 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
1207 (match_operand:MVE_0 2 "s_register_operand" "w")]
1210 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1211 "<mve_insn>.f%#<V_sz_elem>\t%q0, %q1, %q2, #<rot>"
1212 [(set_attr "type" "mve_move")
1216 ;; [vcmpeqq_f, vcmpgeq_f, vcmpgtq_f, vcmpleq_f, vcmpltq_f, vcmpneq_f])
1218 (define_insn "@mve_vcmp<mve_cmp_op>q_f<mode>"
1220 (set (match_operand:<MVE_VPRED> 0 "vpr_register_operand" "=Up")
1221 (MVE_FP_COMPARISONS:<MVE_VPRED> (match_operand:MVE_0 1 "s_register_operand" "w")
1222 (match_operand:MVE_0 2 "s_register_operand" "w")))
1224 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1225 "vcmp.f%#<V_sz_elem> <mve_cmp_op>, %q1, %q2"
1226 [(set_attr "type" "mve_move")
1230 ;; [vcmpeqq_n_f, vcmpgeq_n_f, vcmpgtq_n_f, vcmpleq_n_f, vcmpltq_n_f, vcmpneq_n_f])
1232 (define_insn "@mve_vcmp<mve_cmp_op>q_n_f<mode>"
1234 (set (match_operand:<MVE_VPRED> 0 "vpr_register_operand" "=Up")
1235 (MVE_FP_COMPARISONS:<MVE_VPRED>
1236 (match_operand:MVE_0 1 "s_register_operand" "w")
1237 (vec_duplicate:MVE_0 (match_operand:<V_elem> 2 "s_register_operand" "r"))))
1239 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1240 "vcmp.f%#<V_sz_elem> <mve_cmp_op>, %q1, %2"
1241 [(set_attr "type" "mve_move")
1245 ;; [vctp8q_m vctp16q_m vctp32q_m vctp64q_m])
1247 (define_insn "mve_vctp<MVE_vctp>q_m<MVE_vpred>"
1249 (set (match_operand:MVE_7 0 "vpr_register_operand" "=Up")
1250 (unspec:MVE_7 [(match_operand:SI 1 "s_register_operand" "r")
1251 (match_operand:MVE_7 2 "vpr_register_operand" "Up")]
1255 "vpst\;vctpt.<MVE_vctp>\t%1"
1256 [(set_attr "type" "mve_move")
1257 (set_attr "length""8")])
1260 ;; [vcvtbq_f16_f32])
1262 (define_insn "mve_vcvtbq_f16_f32v8hf"
1264 (set (match_operand:V8HF 0 "s_register_operand" "=w")
1265 (unspec:V8HF [(match_operand:V8HF 1 "s_register_operand" "0")
1266 (match_operand:V4SF 2 "s_register_operand" "w")]
1269 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1270 "vcvtb.f16.f32\t%q0, %q2"
1271 [(set_attr "type" "mve_move")
1275 ;; [vcvttq_f16_f32])
1277 (define_insn "mve_vcvttq_f16_f32v8hf"
1279 (set (match_operand:V8HF 0 "s_register_operand" "=w")
1280 (unspec:V8HF [(match_operand:V8HF 1 "s_register_operand" "0")
1281 (match_operand:V4SF 2 "s_register_operand" "w")]
1284 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1285 "vcvtt.f16.f32\t%q0, %q2"
1286 [(set_attr "type" "mve_move")
1292 (define_insn "mve_veorq_f<mode>"
1294 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1295 (xor:MVE_0 (match_operand:MVE_0 1 "s_register_operand" "w")
1296 (match_operand:MVE_0 2 "s_register_operand" "w")))
1298 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1299 "veor\t%q0, %q1, %q2"
1300 [(set_attr "type" "mve_move")
1307 (define_insn "@mve_<mve_insn>q_f<mode>"
1309 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1310 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
1311 (match_operand:MVE_0 2 "s_register_operand" "w")]
1312 MVE_VMAXNMA_VMINNMAQ))
1314 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1315 "<mve_insn>.f%#<V_sz_elem>\t%q0, %q2"
1316 [(set_attr "type" "mve_move")
1325 (define_insn "@mve_<mve_insn>q_f<mode>"
1327 (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
1328 (unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
1329 (match_operand:MVE_0 2 "s_register_operand" "w")]
1330 MVE_VMAXNMxV_MINNMxVQ))
1332 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1333 "<mve_insn>.f%#<V_sz_elem>\t%0, %q2"
1334 [(set_attr "type" "mve_move")
1341 (define_insn "@mve_<max_min_f_str>q_f<mode>"
1343 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1344 (MAX_MIN_F:MVE_0 (match_operand:MVE_0 1 "s_register_operand" "w")
1345 (match_operand:MVE_0 2 "s_register_operand" "w")))
1347 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1348 "<max_min_f_str>.f%#<V_sz_elem> %q0, %q1, %q2"
1349 [(set_attr "type" "mve_move")
1353 ;; [vmlaldavq_u, vmlaldavq_s]
1358 (define_insn "@mve_<mve_insn>q_<supf><mode>"
1360 (set (match_operand:DI 0 "s_register_operand" "=r")
1361 (unspec:DI [(match_operand:MVE_5 1 "s_register_operand" "w")
1362 (match_operand:MVE_5 2 "s_register_operand" "w")]
1366 "<mve_insn>.<supf>%#<V_sz_elem>\t%Q0, %R0, %q1, %q2"
1367 [(set_attr "type" "mve_move")
1371 ;; [vmovnbq_u, vmovnbq_s]
1372 ;; [vmovntq_s, vmovntq_u]
1373 ;; [vqmovnbq_u, vqmovnbq_s]
1374 ;; [vqmovntq_u, vqmovntq_s]
1378 (define_insn "@mve_<mve_insn>q_<supf><mode>"
1380 (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
1381 (unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
1382 (match_operand:MVE_5 2 "s_register_operand" "w")]
1386 "<mve_insn>.<isu>%#<V_sz_elem>\t%q0, %q2"
1387 [(set_attr "type" "mve_move")
1395 (define_insn "mve_<mve_addsubmul>q_f<mode>"
1397 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1398 (MVE_INT_BINARY_RTX:MVE_0 (match_operand:MVE_0 1 "s_register_operand" "w")
1399 (match_operand:MVE_0 2 "s_register_operand" "w")))
1401 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1402 "<mve_addsubmul>.f%#<V_sz_elem>\t%q0, %q1, %q2"
1403 [(set_attr "type" "mve_move")
1409 (define_insn "mve_vornq_f<mode>"
1411 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1412 (ior:MVE_0 (not:MVE_0 (match_operand:MVE_0 2 "s_register_operand" "w"))
1413 (match_operand:MVE_0 1 "s_register_operand" "w")))
1415 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1416 "vorn\t%q0, %q1, %q2"
1417 [(set_attr "type" "mve_move")
1423 (define_insn "mve_vorrq_f<mode>"
1425 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1426 (ior:MVE_0 (match_operand:MVE_0 1 "s_register_operand" "w")
1427 (match_operand:MVE_0 2 "s_register_operand" "w")))
1429 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1430 "vorr\t%q0, %q1, %q2"
1431 [(set_attr "type" "mve_move")
1435 ;; [vbicq_n_s, vbicq_n_u]
1436 ;; [vorrq_n_u, vorrq_n_s]
1438 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
1440 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
1441 (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
1442 (match_operand:SI 2 "immediate_operand" "i")]
1443 MVE_INT_N_BINARY_LOGIC))
1446 "<mve_insn>.i%#<V_sz_elem> %q0, %2"
1447 [(set_attr "type" "mve_move")
1454 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
1456 (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
1457 (unspec:<V_double_width> [(match_operand:MVE_5 1 "s_register_operand" "w")
1458 (match_operand:<V_elem> 2 "s_register_operand" "r")]
1462 "<mve_insn>.s%#<V_sz_elem>\t%q0, %q1, %2"
1463 [(set_attr "type" "mve_move")
1470 (define_insn "@mve_<mve_insn>q_<supf><mode>"
1472 (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
1473 (unspec:<V_double_width> [(match_operand:MVE_5 1 "s_register_operand" "w")
1474 (match_operand:MVE_5 2 "s_register_operand" "w")]
1478 "<mve_insn>.s%#<V_sz_elem>\t%q0, %q1, %q2"
1479 [(set_attr "type" "mve_move")
1483 ;; [vrmlaldavhq_u vrmlaldavhq_s]
1488 (define_insn "@mve_<mve_insn>q_<supf>v4si"
1490 (set (match_operand:DI 0 "s_register_operand" "=r")
1491 (unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
1492 (match_operand:V4SI 2 "s_register_operand" "w")]
1496 "<mve_insn>.<supf>32\t%Q0, %R0, %q1, %q2"
1497 [(set_attr "type" "mve_move")
1501 ;; [vshllbq_n_s, vshllbq_n_u]
1502 ;; [vshlltq_n_u, vshlltq_n_s]
1504 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
1506 (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
1507 (unspec:<V_double_width> [(match_operand:MVE_3 1 "s_register_operand" "w")
1508 (match_operand:SI 2 "immediate_operand" "i")]
1512 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
1513 [(set_attr "type" "mve_move")
1520 (define_insn "@mve_<mve_insn>q_poly_<supf><mode>"
1522 (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
1523 (unspec:<V_double_width> [(match_operand:MVE_3 1 "s_register_operand" "w")
1524 (match_operand:MVE_3 2 "s_register_operand" "w")]
1528 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %q1, %q2"
1529 [(set_attr "type" "mve_move")
1540 (define_insn "@mve_vcmp<mve_cmp_op1>q_m_f<mode>"
1542 (set (match_operand:<MVE_VPRED> 0 "vpr_register_operand" "=Up")
1543 (unspec:<MVE_VPRED> [(match_operand:MVE_0 1 "s_register_operand" "w")
1544 (match_operand:MVE_0 2 "s_register_operand" "w")
1545 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1548 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1549 "vpst\;vcmpt.f%#<V_sz_elem>\t<mve_cmp_op1>, %q1, %q2"
1550 [(set_attr "type" "mve_move")
1551 (set_attr "length""8")])
1553 ;; [vcvtaq_m_u, vcvtaq_m_s])
1555 (define_insn "mve_vcvtaq_m_<supf><mode>"
1557 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
1558 (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
1559 (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
1560 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1563 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1564 "vpst\;vcvtat.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2"
1565 [(set_attr "type" "mve_move")
1566 (set_attr "length""8")])
1568 ;; [vcvtq_m_to_f_s, vcvtq_m_to_f_u])
1570 (define_insn "mve_vcvtq_m_to_f_<supf><mode>"
1572 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
1573 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
1574 (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
1575 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1578 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
1579 "vpst\;vcvtt.f%#<V_sz_elem>.<supf>%#<V_sz_elem>\t%q0, %q2"
1580 [(set_attr "type" "mve_move")
1581 (set_attr "length""8")])
1584 ;; [vqrshrnbq_n_u, vqrshrnbq_n_s]
1585 ;; [vqrshrntq_n_u, vqrshrntq_n_s]
1588 ;; [vqshrnbq_n_u, vqshrnbq_n_s]
1589 ;; [vqshrntq_n_u, vqshrntq_n_s]
1592 ;; [vrshrnbq_n_s, vrshrnbq_n_u]
1593 ;; [vrshrntq_n_u, vrshrntq_n_s]
1594 ;; [vshrnbq_n_u, vshrnbq_n_s]
1595 ;; [vshrntq_n_s, vshrntq_n_u]
1597 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
1599 (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
1600 (unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
1601 (match_operand:MVE_5 2 "s_register_operand" "w")
1602 (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")]
1606 "<mve_insn>.<isu>%#<V_sz_elem>\t%q0, %q2, %3"
1607 [(set_attr "type" "mve_move")
1611 ;; [vrmlaldavhaq_s vrmlaldavhaq_u]
1612 ;; [vrmlaldavhaxq_s]
1614 ;; [vrmlsldavhaxq_s]
1616 (define_insn "@mve_<mve_insn>q_<supf>v4si"
1618 (set (match_operand:DI 0 "s_register_operand" "=r")
1619 (unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
1620 (match_operand:V4SI 2 "s_register_operand" "w")
1621 (match_operand:V4SI 3 "s_register_operand" "w")]
1625 "<mve_insn>.<supf>32\t%Q0, %R0, %q2, %q3"
1626 [(set_attr "type" "mve_move")
1630 ;; [vabavq_s, vabavq_u])
1632 (define_insn "@mve_<mve_insn>q_<supf><mode>"
1634 (set (match_operand:SI 0 "s_register_operand" "=r")
1635 (unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
1636 (match_operand:MVE_2 2 "s_register_operand" "w")
1637 (match_operand:MVE_2 3 "s_register_operand" "w")]
1641 "<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q2, %q3"
1642 [(set_attr "type" "mve_move")
1646 ;; [vshlcq_u vshlcq_s]
1648 (define_expand "mve_vshlcq_vec_<supf><mode>"
1649 [(match_operand:MVE_2 0 "s_register_operand")
1650 (match_operand:MVE_2 1 "s_register_operand")
1651 (match_operand:SI 2 "s_register_operand")
1652 (match_operand:SI 3 "mve_imm_32")
1653 (unspec:MVE_2 [(const_int 0)] VSHLCQ)]
1656 rtx ignore_wb = gen_reg_rtx (SImode);
1657 emit_insn(gen_mve_vshlcq_<supf><mode>(operands[0], ignore_wb, operands[1],
1658 operands[2], operands[3]));
1662 (define_expand "mve_vshlcq_carry_<supf><mode>"
1663 [(match_operand:SI 0 "s_register_operand")
1664 (match_operand:MVE_2 1 "s_register_operand")
1665 (match_operand:SI 2 "s_register_operand")
1666 (match_operand:SI 3 "mve_imm_32")
1667 (unspec:MVE_2 [(const_int 0)] VSHLCQ)]
1670 rtx ignore_vec = gen_reg_rtx (<MODE>mode);
1671 emit_insn(gen_mve_vshlcq_<supf><mode>(ignore_vec, operands[0], operands[1],
1672 operands[2], operands[3]));
1676 (define_insn "mve_vshlcq_<supf><mode>"
1677 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
1678 (unspec:MVE_2 [(match_operand:MVE_2 2 "s_register_operand" "0")
1679 (match_operand:SI 3 "s_register_operand" "1")
1680 (match_operand:SI 4 "mve_imm_32" "Rf")]
1682 (set (match_operand:SI 1 "s_register_operand" "=r")
1683 (unspec:SI [(match_dup 2)
1688 "vshlc\t%q0, %1, %4")
1693 ;; [vclzq_m_s, vclzq_m_u]
1698 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
1700 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1701 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1702 (match_operand:MVE_2 2 "s_register_operand" "w")
1703 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1707 "vpst\;<mve_insn>t.<isu>%#<V_sz_elem>\t%q0, %q2"
1708 [(set_attr "type" "mve_move")
1709 (set_attr "length""8")])
1712 ;; [vaddvaq_p_u, vaddvaq_p_s])
1714 (define_insn "@mve_<mve_insn>q_p_<supf><mode>"
1716 (set (match_operand:SI 0 "s_register_operand" "=Te")
1717 (unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
1718 (match_operand:MVE_2 2 "s_register_operand" "w")
1719 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1723 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%0, %q2"
1724 [(set_attr "type" "mve_move")
1725 (set_attr "length""8")])
1729 ;; [vcmpeqq_m_n_u, vcmpeqq_m_n_s])
1735 ;; [vcmpneq_m_n_u, vcmpneq_m_n_s])
1737 (define_insn "@mve_vcmp<mve_cmp_op1>q_m_n_<supf><mode>"
1739 (set (match_operand:<MVE_VPRED> 0 "vpr_register_operand" "=Up")
1740 (unspec:<MVE_VPRED> [(match_operand:MVE_2 1 "s_register_operand" "w")
1741 (match_operand:<V_elem> 2 "s_register_operand" "r")
1742 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1746 "vpst\;vcmpt.<isu>%#<V_sz_elem>\t<mve_cmp_op1>, %q1, %2"
1747 [(set_attr "type" "mve_move")
1748 (set_attr "length""8")])
1752 ;; [vcmpeqq_m_u, vcmpeqq_m_s]
1758 ;; [vcmpneq_m_s, vcmpneq_m_u]
1760 (define_insn "@mve_vcmp<mve_cmp_op1>q_m_<supf><mode>"
1762 (set (match_operand:<MVE_VPRED> 0 "vpr_register_operand" "=Up")
1763 (unspec:<MVE_VPRED> [(match_operand:MVE_2 1 "s_register_operand" "w")
1764 (match_operand:MVE_2 2 "s_register_operand" "w")
1765 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1769 "vpst\;vcmpt.<isu>%#<V_sz_elem>\t<mve_cmp_op1>, %q1, %q2"
1770 [(set_attr "type" "mve_move")
1771 (set_attr "length""8")])
1774 ;; [vdupq_m_n_s, vdupq_m_n_u])
1776 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
1778 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1779 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1780 (match_operand:<V_elem> 2 "s_register_operand" "r")
1781 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1785 "vpst\;<mve_insn>t.%#<V_sz_elem>\t%q0, %2"
1786 [(set_attr "type" "mve_move")
1787 (set_attr "length""8")])
1793 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
1795 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1796 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1797 (match_operand:MVE_2 2 "s_register_operand" "w")
1798 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1802 "vpst\;<mve_insn>t.s%#<V_sz_elem>\t%q0, %q2"
1803 [(set_attr "type" "mve_move")
1804 (set_attr "length""8")])
1808 ;; [vmaxvq_p_u, vmaxvq_p_s]
1810 ;; [vminvq_p_s, vminvq_p_u]
1812 (define_insn "@mve_<mve_insn>q_p_<supf><mode>"
1814 (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
1815 (unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
1816 (match_operand:MVE_2 2 "s_register_operand" "w")
1817 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1818 MVE_VMAXVQ_VMINVQ_P))
1821 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%0, %q2"
1822 [(set_attr "type" "mve_move")
1823 (set_attr "length""8")])
1826 ;; [vmladavaq_u, vmladavaq_s]
1831 (define_insn "@mve_<mve_insn>q_<supf><mode>"
1833 (set (match_operand:SI 0 "s_register_operand" "=Te")
1834 (unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
1835 (match_operand:MVE_2 2 "s_register_operand" "w")
1836 (match_operand:MVE_2 3 "s_register_operand" "w")]
1840 "<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q2, %q3"
1841 [(set_attr "type" "mve_move")
1845 ;; [vmladavq_p_u, vmladavq_p_s]
1850 (define_insn "@mve_<mve_insn>q_p_<supf><mode>"
1852 (set (match_operand:SI 0 "s_register_operand" "=Te")
1853 (unspec:SI [(match_operand:MVE_2 1 "s_register_operand" "w")
1854 (match_operand:MVE_2 2 "s_register_operand" "w")
1855 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1859 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%0, %q1, %q2"
1860 [(set_attr "type" "mve_move")
1861 (set_attr "length""8")])
1864 ;; [vmlaq_n_u, vmlaq_n_s]
1865 ;; [vmlasq_n_u, vmlasq_n_s]
1871 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
1873 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1874 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1875 (match_operand:MVE_2 2 "s_register_operand" "w")
1876 (match_operand:<V_elem> 3 "s_register_operand" "r")]
1880 "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
1881 [(set_attr "type" "mve_move")
1885 ;; [vmvnq_m_s, vmvnq_m_u])
1887 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
1889 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1890 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1891 (match_operand:MVE_2 2 "s_register_operand" "w")
1892 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1896 "vpst\;<mve_insn>t\t%q0, %q2"
1897 [(set_attr "type" "mve_move")
1898 (set_attr "length""8")])
1901 ;; [vpselq_u, vpselq_s])
1903 (define_insn "@mve_<mve_insn>q_<supf><mode>"
1905 (set (match_operand:MVE_1 0 "s_register_operand" "=w")
1906 (unspec:MVE_1 [(match_operand:MVE_1 1 "s_register_operand" "w")
1907 (match_operand:MVE_1 2 "s_register_operand" "w")
1908 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1912 "<mve_insn>\t%q0, %q1, %q2"
1913 [(set_attr "type" "mve_move")
1926 (define_insn "@mve_<mve_insn>q_<supf><mode>"
1928 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1929 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1930 (match_operand:MVE_2 2 "s_register_operand" "w")
1931 (match_operand:MVE_2 3 "s_register_operand" "w")]
1935 "<mve_insn>.s%#<V_sz_elem>\t%q0, %q2, %q3"
1936 [(set_attr "type" "mve_move")
1940 ;; [vqrshlq_m_n_s, vqrshlq_m_n_u]
1941 ;; [vrshlq_m_n_s, vrshlq_m_n_u]
1943 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
1945 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1946 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1947 (match_operand:SI 2 "s_register_operand" "r")
1948 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1952 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %2"
1953 [(set_attr "type" "mve_move")
1954 (set_attr "length""8")])
1957 ;; [vqshlq_m_r_u, vqshlq_m_r_s]
1958 ;; [vshlq_m_r_u, vshlq_m_r_s]
1960 (define_insn "@mve_<mve_insn>q_m_r_<supf><mode>"
1962 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1963 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1964 (match_operand:SI 2 "s_register_operand" "r")
1965 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1969 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %2"
1970 [(set_attr "type" "mve_move")
1971 (set_attr "length""8")])
1974 ;; [vrev64q_m_u, vrev64q_m_s])
1976 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
1978 (set (match_operand:MVE_2 0 "s_register_operand" "=&w")
1979 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1980 (match_operand:MVE_2 2 "s_register_operand" "w")
1981 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
1985 "vpst\;<mve_insn>t.%#<V_sz_elem>\t%q0, %q2"
1986 [(set_attr "type" "mve_move")
1987 (set_attr "length""8")])
1990 ;; [vsliq_n_u, vsliq_n_s])
1992 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
1994 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
1995 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
1996 (match_operand:MVE_2 2 "s_register_operand" "w")
1997 (match_operand:SI 3 "<MVE_pred>" "<MVE_constraint>")]
2001 "<mve_insn>.%#<V_sz_elem>\t%q0, %q2, %3"
2002 [(set_attr "type" "mve_move")
2006 ;; [vsriq_n_u, vsriq_n_s])
2008 (define_insn "@mve_<mve_insn>q_n_<supf><mode>"
2010 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2011 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2012 (match_operand:MVE_2 2 "s_register_operand" "w")
2013 (match_operand:SI 3 "<MVE_pred2>" "<MVE_constraint2>")]
2017 "<mve_insn>.%#<V_sz_elem>\t%q0, %q2, %3"
2018 [(set_attr "type" "mve_move")
2031 (define_insn "@mve_<mve_insn>q_m_f<mode>"
2033 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2034 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
2035 (match_operand:MVE_0 2 "s_register_operand" "w")
2036 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2039 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2040 "vpst\;<mve_mnemo>t.f%#<V_sz_elem>\t%q0, %q2"
2041 [(set_attr "type" "mve_move")
2042 (set_attr "length""8")])
2045 ;; [vaddlvaq_p_s vaddlvaq_p_u])
2047 (define_insn "@mve_<mve_insn>q_p_<supf>v4si"
2049 (set (match_operand:DI 0 "s_register_operand" "=r")
2050 (unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
2051 (match_operand:V4SI 2 "s_register_operand" "w")
2052 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
2056 "vpst\;<mve_insn>t.<supf>32\t%Q0, %R0, %q2"
2057 [(set_attr "type" "mve_move")
2058 (set_attr "length""8")])
2060 ;; [vcmlaq, vcmlaq_rot90, vcmlaq_rot180, vcmlaq_rot270])
2062 (define_insn "@mve_<mve_insn>q<mve_rot>_f<mode>"
2064 (set (match_operand:MVE_0 0 "s_register_operand" "=w,w")
2065 (plus:MVE_0 (match_operand:MVE_0 1 "reg_or_zero_operand" "Dz,0")
2067 [(match_operand:MVE_0 2 "s_register_operand" "w,w")
2068 (match_operand:MVE_0 3 "s_register_operand" "w,w")]
2071 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2073 vcmul.f%#<V_sz_elem> %q0, %q2, %q3, #<rot>
2074 vcmla.f%#<V_sz_elem> %q0, %q2, %q3, #<rot>"
2075 [(set_attr "type" "mve_move")
2086 (define_insn "@mve_vcmp<mve_cmp_op1>q_m_n_f<mode>"
2088 (set (match_operand:<MVE_VPRED> 0 "vpr_register_operand" "=Up")
2089 (unspec:<MVE_VPRED> [(match_operand:MVE_0 1 "s_register_operand" "w")
2090 (match_operand:<V_elem> 2 "s_register_operand" "r")
2091 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2094 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2095 "vpst\;vcmpt.f%#<V_sz_elem>\t<mve_cmp_op1>, %q1, %2"
2096 [(set_attr "type" "mve_move")
2097 (set_attr "length""8")])
2100 ;; [vcvtbq_m_f16_f32])
2102 (define_insn "mve_vcvtbq_m_f16_f32v8hf"
2104 (set (match_operand:V8HF 0 "s_register_operand" "=w")
2105 (unspec:V8HF [(match_operand:V8HF 1 "s_register_operand" "0")
2106 (match_operand:V4SF 2 "s_register_operand" "w")
2107 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2110 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2111 "vpst\;vcvtbt.f16.f32\t%q0, %q2"
2112 [(set_attr "type" "mve_move")
2113 (set_attr "length""8")])
2116 ;; [vcvtbq_m_f32_f16])
2118 (define_insn "mve_vcvtbq_m_f32_f16v4sf"
2120 (set (match_operand:V4SF 0 "s_register_operand" "=w")
2121 (unspec:V4SF [(match_operand:V4SF 1 "s_register_operand" "0")
2122 (match_operand:V8HF 2 "s_register_operand" "w")
2123 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2126 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2127 "vpst\;vcvtbt.f32.f16\t%q0, %q2"
2128 [(set_attr "type" "mve_move")
2129 (set_attr "length""8")])
2132 ;; [vcvttq_m_f16_f32])
2134 (define_insn "mve_vcvttq_m_f16_f32v8hf"
2136 (set (match_operand:V8HF 0 "s_register_operand" "=w")
2137 (unspec:V8HF [(match_operand:V8HF 1 "s_register_operand" "0")
2138 (match_operand:V4SF 2 "s_register_operand" "w")
2139 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2142 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2143 "vpst\;vcvttt.f16.f32\t%q0, %q2"
2144 [(set_attr "type" "mve_move")
2145 (set_attr "length""8")])
2148 ;; [vcvttq_m_f32_f16])
2150 (define_insn "mve_vcvttq_m_f32_f16v4sf"
2152 (set (match_operand:V4SF 0 "s_register_operand" "=w")
2153 (unspec:V4SF [(match_operand:V4SF 1 "s_register_operand" "0")
2154 (match_operand:V8HF 2 "s_register_operand" "w")
2155 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2158 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2159 "vpst\;vcvttt.f32.f16\t%q0, %q2"
2160 [(set_attr "type" "mve_move")
2161 (set_attr "length""8")])
2166 (define_insn "@mve_<mve_insn>q_m_n_f<mode>"
2168 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2169 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
2170 (match_operand:<V_elem> 2 "s_register_operand" "r")
2171 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2172 MVE_FP_M_N_VDUPQ_ONLY))
2174 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2175 "vpst\;<mve_insn>t.%#<V_sz_elem>\t%q0, %2"
2176 [(set_attr "type" "mve_move")
2177 (set_attr "length""8")])
2183 (define_insn "@mve_<mve_insn>q_f<mode>"
2185 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2186 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
2187 (match_operand:MVE_0 2 "s_register_operand" "w")
2188 (match_operand:MVE_0 3 "s_register_operand" "w")]
2191 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2192 "<mve_insn>.f%#<V_sz_elem>\t%q0, %q2, %q3"
2193 [(set_attr "type" "mve_move")
2200 (define_insn "@mve_<mve_insn>q_n_f<mode>"
2202 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2203 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
2204 (match_operand:MVE_0 2 "s_register_operand" "w")
2205 (match_operand:<V_elem> 3 "s_register_operand" "r")]
2208 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2209 "<mve_insn>.f%#<V_sz_elem>\t%q0, %q2, %3"
2210 [(set_attr "type" "mve_move")
2217 (define_insn "@mve_<mve_insn>q_m_f<mode>"
2219 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2220 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
2221 (match_operand:MVE_0 2 "s_register_operand" "w")
2222 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2223 MVE_VMAXNMA_VMINNMAQ_M))
2225 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2226 "vpst\;<mve_insn>t.f%#<V_sz_elem>\t%q0, %q2"
2227 [(set_attr "type" "mve_move")
2228 (set_attr "length""8")])
2236 (define_insn "@mve_<mve_insn>q_p_f<mode>"
2238 (set (match_operand:<V_elem> 0 "s_register_operand" "=r")
2239 (unspec:<V_elem> [(match_operand:<V_elem> 1 "s_register_operand" "0")
2240 (match_operand:MVE_0 2 "s_register_operand" "w")
2241 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2242 MVE_VMAXNMxV_MINNMxVQ_P))
2244 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2245 "vpst\;<mve_insn>t.f%#<V_sz_elem>\t%0, %q2"
2246 [(set_attr "type" "mve_move")
2247 (set_attr "length""8")])
2250 ;; [vmlaldavaq_s, vmlaldavaq_u]
2255 (define_insn "@mve_<mve_insn>q_<supf><mode>"
2257 (set (match_operand:DI 0 "s_register_operand" "=r")
2258 (unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
2259 (match_operand:MVE_5 2 "s_register_operand" "w")
2260 (match_operand:MVE_5 3 "s_register_operand" "w")]
2264 "<mve_insn>.<supf>%#<V_sz_elem>\t%Q0, %R0, %q2, %q3"
2265 [(set_attr "type" "mve_move")
2269 ;; [vmlaldavq_p_u, vmlaldavq_p_s]
2274 (define_insn "@mve_<mve_insn>q_p_<supf><mode>"
2276 (set (match_operand:DI 0 "s_register_operand" "=r")
2277 (unspec:DI [(match_operand:MVE_5 1 "s_register_operand" "w")
2278 (match_operand:MVE_5 2 "s_register_operand" "w")
2279 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2283 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%Q0, %R0, %q1, %q2"
2284 [(set_attr "type" "mve_move")
2285 (set_attr "length""8")])
2288 ;; [vmovlbq_m_u, vmovlbq_m_s])
2289 ;; [vmovltq_m_u, vmovltq_m_s])
2291 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
2293 (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
2294 (unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
2295 (match_operand:MVE_3 2 "s_register_operand" "w")
2296 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2300 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %q2"
2301 [(set_attr "type" "mve_move")
2302 (set_attr "length""8")])
2305 ;; [vmovnbq_m_u, vmovnbq_m_s]
2306 ;; [vmovntq_m_u, vmovntq_m_s]
2307 ;; [vqmovnbq_m_s, vqmovnbq_m_u]
2308 ;; [vqmovntq_m_u, vqmovntq_m_s]
2312 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
2314 (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
2315 (unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
2316 (match_operand:MVE_5 2 "s_register_operand" "w")
2317 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2321 "vpst\;<mve_insn>t.<isu>%#<V_sz_elem>\t%q0, %q2"
2322 [(set_attr "type" "mve_move")
2323 (set_attr "length""8")])
2326 ;; [vmvnq_m_n_u, vmvnq_m_n_s])
2328 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2330 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
2331 (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
2332 (match_operand:SI 2 "immediate_operand" "i")
2333 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2337 "vpst\;<mve_insn>t.i%#<V_sz_elem>\t%q0, %2"
2338 [(set_attr "type" "mve_move")
2339 (set_attr "length""8")])
2342 ;; [vbicq_m_n_s, vbicq_m_n_u]
2343 ;; [vorrq_m_n_s, vorrq_m_n_u]
2345 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2347 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
2348 (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
2349 (match_operand:SI 2 "immediate_operand" "i")
2350 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2351 MVE_INT_M_N_BINARY_LOGIC))
2354 "vpst\;<mve_insn>t.i%#<V_sz_elem>\t%q0, %2"
2355 [(set_attr "type" "mve_move")
2356 (set_attr "length""8")])
2361 (define_insn "@mve_<mve_insn>q_f<mode>"
2363 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2364 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "w")
2365 (match_operand:MVE_0 2 "s_register_operand" "w")
2366 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2369 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2370 "<mve_insn>\t%q0, %q1, %q2"
2371 [(set_attr "type" "mve_move")
2377 (define_insn "@mve_<mve_insn>q_m_f<mode>"
2379 (set (match_operand:MVE_V8HF 0 "s_register_operand" "=w")
2380 (unspec:MVE_V8HF [(match_operand:MVE_V8HF 1 "s_register_operand" "0")
2381 (match_operand:MVE_V8HF 2 "s_register_operand" "w")
2382 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2383 MVE_FP_M_VREV32Q_ONLY))
2385 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2386 "vpst\;<mve_insn>t.<V_sz_elem>\t%q0, %q2"
2387 [(set_attr "type" "mve_move")
2388 (set_attr "length""8")])
2391 ;; [vrev32q_m_s, vrev32q_m_u])
2393 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
2395 (set (match_operand:MVE_3 0 "s_register_operand" "=w")
2396 (unspec:MVE_3 [(match_operand:MVE_3 1 "s_register_operand" "0")
2397 (match_operand:MVE_3 2 "s_register_operand" "w")
2398 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2402 "vpst\;<mve_insn>t.%#<V_sz_elem>\t%q0, %q2"
2403 [(set_attr "type" "mve_move")
2404 (set_attr "length""8")])
2409 (define_insn "@mve_<mve_insn>q_m_f<mode>"
2411 (set (match_operand:MVE_0 0 "s_register_operand" "=&w")
2412 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
2413 (match_operand:MVE_0 2 "s_register_operand" "w")
2414 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2415 MVE_FP_M_VREV64Q_ONLY))
2417 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2418 "vpst\;<mve_insn>t.%#<V_sz_elem>\t%q0, %q2"
2419 [(set_attr "type" "mve_move")
2420 (set_attr "length""8")])
2423 ;; [vrmlaldavhq_p_u vrmlaldavhq_p_s]
2424 ;; [vrmlaldavhxq_p_s]
2425 ;; [vrmlsldavhq_p_s]
2426 ;; [vrmlsldavhxq_p_s]
2428 (define_insn "@mve_<mve_insn>q_p_<supf>v4si"
2430 (set (match_operand:DI 0 "s_register_operand" "=r")
2431 (unspec:DI [(match_operand:V4SI 1 "s_register_operand" "w")
2432 (match_operand:V4SI 2 "s_register_operand" "w")
2433 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
2434 MVE_VRMLxLDAVHxQ_P))
2437 "vpst\;<mve_insn>t.<supf>32\t%Q0, %R0, %q1, %q2"
2438 [(set_attr "type" "mve_move")
2439 (set_attr "length""8")])
2442 ;; [vcvtmq_m_s, vcvtmq_m_u])
2444 (define_insn "mve_vcvtmq_m_<supf><mode>"
2446 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
2447 (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
2448 (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
2449 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2452 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2453 "vpst\;vcvtmt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2"
2454 [(set_attr "type" "mve_move")
2455 (set_attr "length""8")])
2458 ;; [vcvtpq_m_u, vcvtpq_m_s])
2460 (define_insn "mve_vcvtpq_m_<supf><mode>"
2462 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
2463 (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
2464 (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
2465 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2468 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2469 "vpst\;vcvtpt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2"
2470 [(set_attr "type" "mve_move")
2471 (set_attr "length""8")])
2474 ;; [vcvtnq_m_s, vcvtnq_m_u])
2476 (define_insn "mve_vcvtnq_m_<supf><mode>"
2478 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
2479 (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
2480 (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
2481 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2484 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2485 "vpst\;vcvtnt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2"
2486 [(set_attr "type" "mve_move")
2487 (set_attr "length""8")])
2490 ;; [vcvtq_m_n_from_f_s, vcvtq_m_n_from_f_u])
2492 (define_insn "mve_vcvtq_m_n_from_f_<supf><mode>"
2494 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
2495 (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
2496 (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
2497 (match_operand:SI 3 "<MVE_pred2>" "<MVE_constraint2>")
2498 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2501 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2502 "vpst\;vcvtt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2, %3"
2503 [(set_attr "type" "mve_move")
2504 (set_attr "length""8")])
2507 ;; [vrev16q_m_u, vrev16q_m_s])
2509 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
2511 (set (match_operand:MVE_V16QI 0 "s_register_operand" "=w")
2512 (unspec:MVE_V16QI [(match_operand:MVE_V16QI 1 "s_register_operand" "0")
2513 (match_operand:MVE_V16QI 2 "s_register_operand" "w")
2514 (match_operand:V16BI 3 "vpr_register_operand" "Up")]
2518 "vpst\;<mve_insn>t.<V_sz_elem>\t%q0, %q2"
2519 [(set_attr "type" "mve_move")
2520 (set_attr "length""8")])
2523 ;; [vcvtq_m_from_f_u, vcvtq_m_from_f_s])
2525 (define_insn "mve_vcvtq_m_from_f_<supf><mode>"
2527 (set (match_operand:MVE_5 0 "s_register_operand" "=w")
2528 (unspec:MVE_5 [(match_operand:MVE_5 1 "s_register_operand" "0")
2529 (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
2530 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
2533 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2534 "vpst\;vcvtt.<supf>%#<V_sz_elem>.f%#<V_sz_elem>\t%q0, %q2"
2535 [(set_attr "type" "mve_move")
2536 (set_attr "length""8")])
2539 ;; [vabavq_p_s, vabavq_p_u])
2541 (define_insn "@mve_<mve_insn>q_p_<supf><mode>"
2543 (set (match_operand:SI 0 "s_register_operand" "=r")
2544 (unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
2545 (match_operand:MVE_2 2 "s_register_operand" "w")
2546 (match_operand:MVE_2 3 "s_register_operand" "w")
2547 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2551 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%0, %q2, %q3"
2552 [(set_attr "type" "mve_move")
2553 (set_attr "length" "8")])
2558 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2560 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2561 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2562 (match_operand:MVE_2 2 "s_register_operand" "w")
2563 (match_operand:SI 3 "<MVE_pred>" "<MVE_constraint>")
2564 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2568 "vpst\n\t<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
2569 [(set_attr "type" "mve_move")
2570 (set_attr "length" "8")])
2573 ;; [vsriq_m_n_s, vsriq_m_n_u])
2575 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2577 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2578 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2579 (match_operand:MVE_2 2 "s_register_operand" "w")
2580 (match_operand:SI 3 "<MVE_pred2>" "<MVE_constraint2>")
2581 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2585 "vpst\;<mve_insn>t.%#<V_sz_elem>\t%q0, %q2, %3"
2586 [(set_attr "type" "mve_move")
2587 (set_attr "length" "8")])
2590 ;; [vcvtq_m_n_to_f_u, vcvtq_m_n_to_f_s])
2592 (define_insn "mve_vcvtq_m_n_to_f_<supf><mode>"
2594 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
2595 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
2596 (match_operand:<MVE_CNVT> 2 "s_register_operand" "w")
2597 (match_operand:SI 3 "<MVE_pred2>" "<MVE_constraint2>")
2598 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2601 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
2602 "vpst\;vcvtt.f%#<V_sz_elem>.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
2603 [(set_attr "type" "mve_move")
2604 (set_attr "length""8")])
2607 ;; [vabdq_m_s, vabdq_m_u]
2608 ;; [vhaddq_m_s, vhaddq_m_u]
2609 ;; [vhsubq_m_s, vhsubq_m_u]
2610 ;; [vmaxq_m_s, vmaxq_m_u]
2611 ;; [vminq_m_s, vminq_m_u]
2612 ;; [vmulhq_m_s, vmulhq_m_u]
2613 ;; [vqaddq_m_u, vqaddq_m_s]
2620 ;; [vqrdmladhxq_m_s]
2622 ;; [vqrdmlsdhxq_m_s]
2624 ;; [vqrshlq_m_u, vqrshlq_m_s]
2625 ;; [vqshlq_m_u, vqshlq_m_s]
2626 ;; [vqsubq_m_u, vqsubq_m_s]
2627 ;; [vrhaddq_m_u, vrhaddq_m_s]
2628 ;; [vrmulhq_m_u, vrmulhq_m_s]
2629 ;; [vrshlq_m_s, vrshlq_m_u]
2630 ;; [vshlq_m_s, vshlq_m_u]
2632 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
2634 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2635 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2636 (match_operand:MVE_2 2 "s_register_operand" "w")
2637 (match_operand:MVE_2 3 "s_register_operand" "w")
2638 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2639 MVE_INT_SU_M_BINARY))
2642 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
2643 [(set_attr "type" "mve_move")
2644 (set_attr "length""8")])
2647 ;; [vaddq_m_n_s, vaddq_m_n_u]
2648 ;; [vsubq_m_n_s, vsubq_m_n_u]
2649 ;; [vmulq_m_n_s, vmulq_m_n_u]
2651 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2653 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2654 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2655 (match_operand:MVE_2 2 "s_register_operand" "w")
2656 (match_operand:<V_elem> 3 "s_register_operand" "r")
2657 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2658 MVE_INT_M_N_BINARY))
2661 "vpst\;<mve_insn>t.i%#<V_sz_elem> %q0, %q2, %3"
2662 [(set_attr "type" "mve_move")
2663 (set_attr "length""8")])
2666 ;; [vaddq_m_u, vaddq_m_s]
2667 ;; [vsubq_m_u, vsubq_m_s]
2668 ;; [vmulq_m_u, vmulq_m_s]
2670 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
2672 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2673 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2674 (match_operand:MVE_2 2 "s_register_operand" "w")
2675 (match_operand:MVE_2 3 "s_register_operand" "w")
2676 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2680 "vpst\;<mve_insn>t.i%#<V_sz_elem>\t%q0, %q2, %q3"
2681 [(set_attr "type" "mve_move")
2682 (set_attr "length""8")])
2685 ;; [vandq_m_u, vandq_m_s]
2686 ;; [vbicq_m_u, vbicq_m_s]
2687 ;; [veorq_m_u, veorq_m_s]
2688 ;; [vorrq_m_u, vorrq_m_s]
2690 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
2692 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2693 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2694 (match_operand:MVE_2 2 "s_register_operand" "w")
2695 (match_operand:MVE_2 3 "s_register_operand" "w")
2696 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2697 MVE_INT_M_BINARY_LOGIC))
2700 "vpst\;<mve_insn>t\t%q0, %q2, %q3"
2701 [(set_attr "type" "mve_move")
2702 (set_attr "length""8")])
2705 ;; [vbrsrq_m_n_u, vbrsrq_m_n_s])
2707 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2709 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2710 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2711 (match_operand:MVE_2 2 "s_register_operand" "w")
2712 (match_operand:SI 3 "s_register_operand" "r")
2713 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2717 "vpst\;<mve_insn>t.%#<V_sz_elem>\t%q0, %q2, %3"
2718 [(set_attr "type" "mve_move")
2719 (set_attr "length""8")])
2722 ;; [vcaddq_rot90_m_u, vcaddq_rot90_m_s]
2723 ;; [vcaddq_rot270_m_u, vcaddq_rot270_m_s]
2724 ;; [vhcaddq_rot90_m_s]
2725 ;; [vhcaddq_rot270_m_s]
2727 (define_insn "@mve_<mve_insn>q<mve_rot>_m_<supf><mode>"
2729 (set (match_operand:MVE_2 0 "s_register_operand" "<earlyclobber_32>")
2730 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2731 (match_operand:MVE_2 2 "s_register_operand" "w")
2732 (match_operand:MVE_2 3 "s_register_operand" "w")
2733 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2737 "vpst\;<mve_insn>t.<isu>%#<V_sz_elem>\t%q0, %q2, %q3, #<rot>"
2738 [(set_attr "type" "mve_move")
2739 (set_attr "length""8")])
2742 ;; [vhaddq_m_n_s, vhaddq_m_n_u]
2743 ;; [vhsubq_m_n_s, vhsubq_m_n_u]
2744 ;; [vmlaq_m_n_s, vmlaq_m_n_u]
2745 ;; [vmlasq_m_n_u, vmlasq_m_n_s]
2746 ;; [vqaddq_m_n_u, vqaddq_m_n_s]
2748 ;; [vqdmlashq_m_n_s]
2750 ;; [vqrdmlahq_m_n_s]
2751 ;; [vqrdmlashq_m_n_s]
2752 ;; [vqrdmulhq_m_n_s]
2753 ;; [vqsubq_m_n_u, vqsubq_m_n_s]
2755 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2757 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2758 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2759 (match_operand:MVE_2 2 "s_register_operand" "w")
2760 (match_operand:<V_elem> 3 "s_register_operand" "r")
2761 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2762 MVE_INT_SU_M_N_BINARY))
2765 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
2766 [(set_attr "type" "mve_move")
2767 (set_attr "length""8")])
2771 ;; [vmladavaq_p_u, vmladavaq_p_s]
2776 (define_insn "@mve_<mve_insn>q_p_<supf><mode>"
2778 (set (match_operand:SI 0 "s_register_operand" "=Te")
2779 (unspec:SI [(match_operand:SI 1 "s_register_operand" "0")
2780 (match_operand:MVE_2 2 "s_register_operand" "w")
2781 (match_operand:MVE_2 3 "s_register_operand" "w")
2782 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2786 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%0, %q2, %q3"
2787 [(set_attr "type" "mve_move")
2788 (set_attr "length""8")])
2791 ;; [vmullbq_int_m_u, vmullbq_int_m_s]
2792 ;; [vmulltq_int_m_s, vmulltq_int_m_u]
2794 (define_insn "@mve_<mve_insn>q_int_m_<supf><mode>"
2796 (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
2797 (unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
2798 (match_operand:MVE_2 2 "s_register_operand" "w")
2799 (match_operand:MVE_2 3 "s_register_operand" "w")
2800 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2804 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
2805 [(set_attr "type" "mve_move")
2806 (set_attr "length""8")])
2809 ;; [vornq_m_u, vornq_m_s])
2811 (define_insn "mve_vornq_m_<supf><mode>"
2813 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2814 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2815 (match_operand:MVE_2 2 "s_register_operand" "w")
2816 (match_operand:MVE_2 3 "s_register_operand" "w")
2817 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2821 "vpst\;vornt\t%q0, %q2, %q3"
2822 [(set_attr "type" "mve_move")
2823 (set_attr "length""8")])
2826 ;; [vqshlq_m_n_s, vqshlq_m_n_u]
2827 ;; [vshlq_m_n_s, vshlq_m_n_u]
2829 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2831 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2832 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2833 (match_operand:MVE_2 2 "s_register_operand" "w")
2834 (match_operand:SI 3 "immediate_operand" "i")
2835 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2839 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
2840 [(set_attr "type" "mve_move")
2841 (set_attr "length""8")])
2844 ;; [vrshrq_m_n_s, vrshrq_m_n_u])
2845 ;; [vshrq_m_n_s, vshrq_m_n_u])
2847 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2849 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2850 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2851 (match_operand:MVE_2 2 "s_register_operand" "w")
2852 (match_operand:SI 3 "<MVE_pred2>" "<MVE_constraint2>")
2853 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2857 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
2858 [(set_attr "type" "mve_move")
2859 (set_attr "length""8")])
2862 ;; [vsliq_m_n_u, vsliq_m_n_s])
2864 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2866 (set (match_operand:MVE_2 0 "s_register_operand" "=w")
2867 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
2868 (match_operand:MVE_2 2 "s_register_operand" "w")
2869 (match_operand:SI 3 "<MVE_pred>" "<MVE_constraint>")
2870 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2874 "vpst\;<mve_insn>t.%#<V_sz_elem>\t%q0, %q2, %3"
2875 [(set_attr "type" "mve_move")
2876 (set_attr "length""8")])
2879 ;; [vmlaldavaq_p_u, vmlaldavaq_p_s]
2880 ;; [vmlaldavaxq_p_s]
2882 ;; [vmlsldavaxq_p_s]
2884 (define_insn "@mve_<mve_insn>q_p_<supf><mode>"
2886 (set (match_operand:DI 0 "s_register_operand" "=r")
2887 (unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
2888 (match_operand:MVE_5 2 "s_register_operand" "w")
2889 (match_operand:MVE_5 3 "s_register_operand" "w")
2890 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2894 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%Q0, %R0, %q2, %q3"
2895 [(set_attr "type" "mve_move")
2896 (set_attr "length""8")])
2899 ;; [vqrshrnbq_m_n_u, vqrshrnbq_m_n_s]
2900 ;; [vqrshrntq_m_n_s, vqrshrntq_m_n_u]
2901 ;; [vqrshrunbq_m_n_s]
2902 ;; [vqrshruntq_m_n_s]
2903 ;; [vqshrnbq_m_n_u, vqshrnbq_m_n_s]
2904 ;; [vqshrntq_m_n_s, vqshrntq_m_n_u]
2905 ;; [vqshrunbq_m_n_s]
2906 ;; [vqshruntq_m_n_s]
2907 ;; [vrshrnbq_m_n_u, vrshrnbq_m_n_s]
2908 ;; [vrshrntq_m_n_u, vrshrntq_m_n_s]
2909 ;; [vshrnbq_m_n_s, vshrnbq_m_n_u]
2910 ;; [vshrntq_m_n_s, vshrntq_m_n_u]
2912 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2914 (set (match_operand:<V_narrow_pack> 0 "s_register_operand" "=w")
2915 (unspec:<V_narrow_pack> [(match_operand:<V_narrow_pack> 1 "s_register_operand" "0")
2916 (match_operand:MVE_5 2 "s_register_operand" "w")
2917 (match_operand:SI 3 "<MVE_pred3>" "<MVE_constraint3>")
2918 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2922 "vpst\;<mve_insn>t.<isu>%#<V_sz_elem>\t%q0, %q2, %3"
2923 [(set_attr "type" "mve_move")
2924 (set_attr "length""8")])
2927 ;; [vrmlaldavhaq_p_s, vrmlaldavhaq_p_u]
2928 ;; [vrmlaldavhaxq_p_s]
2929 ;; [vrmlsldavhaq_p_s]
2930 ;; [vrmlsldavhaxq_p_s]
2932 (define_insn "@mve_<mve_insn>q_p_<supf>v4si"
2934 (set (match_operand:DI 0 "s_register_operand" "=r")
2935 (unspec:DI [(match_operand:DI 1 "s_register_operand" "0")
2936 (match_operand:V4SI 2 "s_register_operand" "w")
2937 (match_operand:V4SI 3 "s_register_operand" "w")
2938 (match_operand:V4BI 4 "vpr_register_operand" "Up")]
2939 MVE_VRMLxLDAVHAxQ_P))
2942 "vpst\;<mve_insn>t.<supf>32\t%Q0, %R0, %q2, %q3"
2943 [(set_attr "type" "mve_move")
2944 (set_attr "length""8")])
2947 ;; [vshllbq_m_n_u, vshllbq_m_n_s]
2948 ;; [vshlltq_m_n_u, vshlltq_m_n_s]
2950 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2952 (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
2953 (unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
2954 (match_operand:MVE_3 2 "s_register_operand" "w")
2955 (match_operand:SI 3 "immediate_operand" "i")
2956 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2960 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
2961 [(set_attr "type" "mve_move")
2962 (set_attr "length""8")])
2965 ;; [vmullbq_poly_m_p]
2966 ;; [vmulltq_poly_m_p]
2968 (define_insn "@mve_<mve_insn>q_poly_m_<supf><mode>"
2970 (set (match_operand:<V_double_width> 0 "s_register_operand" "=w")
2971 (unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
2972 (match_operand:MVE_3 2 "s_register_operand" "w")
2973 (match_operand:MVE_3 3 "s_register_operand" "w")
2974 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2978 "vpst\;<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %q2, %q3"
2979 [(set_attr "type" "mve_move")
2980 (set_attr "length""8")])
2983 ;; [vqdmullbq_m_n_s]
2984 ;; [vqdmulltq_m_n_s]
2986 (define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
2988 (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
2989 (unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
2990 (match_operand:MVE_5 2 "s_register_operand" "w")
2991 (match_operand:<V_elem> 3 "s_register_operand" "r")
2992 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
2996 "vpst\;<mve_insn>t.s%#<V_sz_elem>\t%q0, %q2, %3"
2997 [(set_attr "type" "mve_move")
2998 (set_attr "length""8")])
3004 (define_insn "@mve_<mve_insn>q_m_<supf><mode>"
3006 (set (match_operand:<V_double_width> 0 "s_register_operand" "<earlyclobber_32>")
3007 (unspec:<V_double_width> [(match_operand:<V_double_width> 1 "s_register_operand" "0")
3008 (match_operand:MVE_5 2 "s_register_operand" "w")
3009 (match_operand:MVE_5 3 "s_register_operand" "w")
3010 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
3014 "vpst\;<mve_insn>t.s%#<V_sz_elem>\t%q0, %q2, %q3"
3015 [(set_attr "type" "mve_move")
3016 (set_attr "length""8")])
3028 (define_insn "@mve_<mve_insn>q_m_f<mode>"
3030 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
3031 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
3032 (match_operand:MVE_0 2 "s_register_operand" "w")
3033 (match_operand:MVE_0 3 "s_register_operand" "w")
3034 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
3037 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3038 "vpst\;<mve_insn>t.f%#<V_sz_elem> %q0, %q2, %q3"
3039 [(set_attr "type" "mve_move")
3040 (set_attr "length""8")])
3049 (define_insn "@mve_<mve_insn>q_m_n_f<mode>"
3051 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
3052 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
3053 (match_operand:MVE_0 2 "s_register_operand" "w")
3054 (match_operand:<V_elem> 3 "s_register_operand" "r")
3055 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
3058 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3059 "vpst\;<mve_insn>t.f%#<V_sz_elem>\t%q0, %q2, %3"
3060 [(set_attr "type" "mve_move")
3061 (set_attr "length""8")])
3069 (define_insn "@mve_<mve_insn>q_m_f<mode>"
3071 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
3072 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
3073 (match_operand:MVE_0 2 "s_register_operand" "w")
3074 (match_operand:MVE_0 3 "s_register_operand" "w")
3075 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
3076 MVE_FP_M_BINARY_LOGIC))
3078 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3079 "vpst\;<mve_insn>t\t%q0, %q2, %q3"
3080 [(set_attr "type" "mve_move")
3081 (set_attr "length""8")])
3086 (define_insn "@mve_<mve_insn>q_m_n_f<mode>"
3088 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
3089 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
3090 (match_operand:MVE_0 2 "s_register_operand" "w")
3091 (match_operand:SI 3 "s_register_operand" "r")
3092 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
3095 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3096 "vpst\;<mve_insn>t.%#<V_sz_elem>\t%q0, %q2, %3"
3097 [(set_attr "type" "mve_move")
3098 (set_attr "length""8")])
3101 ;; [vcaddq_rot90_m_f]
3102 ;; [vcaddq_rot270_m_f]
3104 ;; [vcmulq_rot90_m_f]
3105 ;; [vcmulq_rot180_m_f]
3106 ;; [vcmulq_rot270_m_f]
3108 (define_insn "@mve_<mve_insn>q<mve_rot>_m_f<mode>"
3110 (set (match_operand:MVE_0 0 "s_register_operand" "<earlyclobber_32>")
3111 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
3112 (match_operand:MVE_0 2 "s_register_operand" "w")
3113 (match_operand:MVE_0 3 "s_register_operand" "w")
3114 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
3115 MVE_VCADDQ_VCMULQ_M))
3117 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3118 "vpst\;<mve_insn>t.f%#<V_sz_elem>\t%q0, %q2, %q3, #<rot>"
3119 [(set_attr "type" "mve_move")
3120 (set_attr "length""8")])
3124 ;; [vcmlaq_rot90_m_f]
3125 ;; [vcmlaq_rot180_m_f]
3126 ;; [vcmlaq_rot270_m_f]
3128 (define_insn "@mve_<mve_insn>q<mve_rot>_m_f<mode>"
3130 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
3131 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
3132 (match_operand:MVE_0 2 "s_register_operand" "w")
3133 (match_operand:MVE_0 3 "s_register_operand" "w")
3134 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
3137 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3138 "vpst\;<mve_insn>t.f%#<V_sz_elem>\t%q0, %q2, %q3, #<rot>"
3139 [(set_attr "type" "mve_move")
3140 (set_attr "length""8")])
3145 (define_insn "mve_vornq_m_f<mode>"
3147 (set (match_operand:MVE_0 0 "s_register_operand" "=w")
3148 (unspec:MVE_0 [(match_operand:MVE_0 1 "s_register_operand" "0")
3149 (match_operand:MVE_0 2 "s_register_operand" "w")
3150 (match_operand:MVE_0 3 "s_register_operand" "w")
3151 (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
3154 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3155 "vpst\;vornt\t%q0, %q2, %q3"
3156 [(set_attr "type" "mve_move")
3157 (set_attr "length""8")])
3160 ;; [vstrbq_s vstrbq_u]
3162 (define_insn "mve_vstrbq_<supf><mode>"
3163 [(set (match_operand:<MVE_B_ELEM> 0 "mve_memory_operand" "=Ux")
3164 (unspec:<MVE_B_ELEM> [(match_operand:MVE_2 1 "s_register_operand" "w")]
3170 int regno = REGNO (operands[1]);
3171 ops[1] = gen_rtx_REG (TImode, regno);
3172 ops[0] = operands[0];
3173 output_asm_insn("vstrb.<V_sz_elem>\t%q1, %E0",ops);
3176 [(set_attr "length" "4")])
3179 ;; [vstrbq_scatter_offset_s vstrbq_scatter_offset_u]
3181 (define_expand "mve_vstrbq_scatter_offset_<supf><mode>"
3182 [(match_operand:<MVE_B_ELEM> 0 "mve_scatter_memory")
3183 (match_operand:MVE_2 1 "s_register_operand")
3184 (match_operand:MVE_2 2 "s_register_operand")
3185 (unspec:V4SI [(const_int 0)] VSTRBSOQ)]
3188 rtx ind = XEXP (operands[0], 0);
3189 gcc_assert (REG_P (ind));
3190 emit_insn (gen_mve_vstrbq_scatter_offset_<supf><mode>_insn (ind, operands[1],
3195 (define_insn "mve_vstrbq_scatter_offset_<supf><mode>_insn"
3196 [(set (mem:BLK (scratch))
3198 [(match_operand:SI 0 "register_operand" "r")
3199 (match_operand:MVE_2 1 "s_register_operand" "w")
3200 (match_operand:MVE_2 2 "s_register_operand" "w")]
3203 "vstrb.<V_sz_elem>\t%q2, [%0, %q1]"
3204 [(set_attr "length" "4")])
3207 ;; [vstrwq_scatter_base_s vstrwq_scatter_base_u]
3209 (define_insn "mve_vstrwq_scatter_base_<supf>v4si"
3210 [(set (mem:BLK (scratch))
3212 [(match_operand:V4SI 0 "s_register_operand" "w")
3213 (match_operand:SI 1 "immediate_operand" "i")
3214 (match_operand:V4SI 2 "s_register_operand" "w")]
3220 ops[0] = operands[0];
3221 ops[1] = operands[1];
3222 ops[2] = operands[2];
3223 output_asm_insn("vstrw.u32\t%q2, [%q0, %1]",ops);
3226 [(set_attr "length" "4")])
3229 ;; [vldrbq_gather_offset_s vldrbq_gather_offset_u]
3231 (define_insn "mve_vldrbq_gather_offset_<supf><mode>"
3232 [(set (match_operand:MVE_2 0 "s_register_operand" "=&w")
3233 (unspec:MVE_2 [(match_operand:<MVE_B_ELEM> 1 "memory_operand" "Us")
3234 (match_operand:MVE_2 2 "s_register_operand" "w")]
3240 ops[0] = operands[0];
3241 ops[1] = operands[1];
3242 ops[2] = operands[2];
3243 if (!strcmp ("<supf>","s") && <V_sz_elem> == 8)
3244 output_asm_insn ("vldrb.u8\t%q0, [%m1, %q2]",ops);
3246 output_asm_insn ("vldrb.<supf><V_sz_elem>\t%q0, [%m1, %q2]",ops);
3249 [(set_attr "length" "4")])
3252 ;; [vldrbq_s vldrbq_u]
3254 (define_insn "mve_vldrbq_<supf><mode>"
3255 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
3256 (unspec:MVE_2 [(match_operand:<MVE_B_ELEM> 1 "mve_memory_operand" "Ux")]
3262 int regno = REGNO (operands[0]);
3263 ops[0] = gen_rtx_REG (TImode, regno);
3264 ops[1] = operands[1];
3265 if (<V_sz_elem> == 8)
3266 output_asm_insn ("vldrb.<V_sz_elem>\t%q0, %E1",ops);
3268 output_asm_insn ("vldrb.<supf><V_sz_elem>\t%q0, %E1",ops);
3271 [(set_attr "length" "4")])
3274 ;; [vldrwq_gather_base_s vldrwq_gather_base_u]
3276 (define_insn "mve_vldrwq_gather_base_<supf>v4si"
3277 [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
3278 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
3279 (match_operand:SI 2 "immediate_operand" "i")]
3285 ops[0] = operands[0];
3286 ops[1] = operands[1];
3287 ops[2] = operands[2];
3288 output_asm_insn ("vldrw.u32\t%q0, [%q1, %2]",ops);
3291 [(set_attr "length" "4")])
3294 ;; [vstrbq_scatter_offset_p_s vstrbq_scatter_offset_p_u]
3296 (define_expand "mve_vstrbq_scatter_offset_p_<supf><mode>"
3297 [(match_operand:<MVE_B_ELEM> 0 "mve_scatter_memory")
3298 (match_operand:MVE_2 1 "s_register_operand")
3299 (match_operand:MVE_2 2 "s_register_operand")
3300 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")
3301 (unspec:V4SI [(const_int 0)] VSTRBSOQ)]
3304 rtx ind = XEXP (operands[0], 0);
3305 gcc_assert (REG_P (ind));
3307 gen_mve_vstrbq_scatter_offset_p_<supf><mode>_insn (ind, operands[1],
3313 (define_insn "mve_vstrbq_scatter_offset_p_<supf><mode>_insn"
3314 [(set (mem:BLK (scratch))
3316 [(match_operand:SI 0 "register_operand" "r")
3317 (match_operand:MVE_2 1 "s_register_operand" "w")
3318 (match_operand:MVE_2 2 "s_register_operand" "w")
3319 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
3322 "vpst\;vstrbt.<V_sz_elem>\t%q2, [%0, %q1]"
3323 [(set_attr "length" "8")])
3326 ;; [vstrwq_scatter_base_p_s vstrwq_scatter_base_p_u]
3328 (define_insn "mve_vstrwq_scatter_base_p_<supf>v4si"
3329 [(set (mem:BLK (scratch))
3331 [(match_operand:V4SI 0 "s_register_operand" "w")
3332 (match_operand:SI 1 "immediate_operand" "i")
3333 (match_operand:V4SI 2 "s_register_operand" "w")
3334 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
3340 ops[0] = operands[0];
3341 ops[1] = operands[1];
3342 ops[2] = operands[2];
3343 output_asm_insn ("vpst\n\tvstrwt.u32\t%q2, [%q0, %1]",ops);
3346 [(set_attr "length" "8")])
3348 (define_insn "mve_vstrbq_p_<supf><mode>"
3349 [(set (match_operand:<MVE_B_ELEM> 0 "mve_memory_operand" "=Ux")
3350 (unspec:<MVE_B_ELEM>
3351 [(match_operand:MVE_2 1 "s_register_operand" "w")
3352 (match_operand:<MVE_VPRED> 2 "vpr_register_operand" "Up")
3358 int regno = REGNO (operands[1]);
3359 ops[1] = gen_rtx_REG (TImode, regno);
3360 ops[0] = operands[0];
3361 output_asm_insn ("vpst\;vstrbt.<V_sz_elem>\t%q1, %E0",ops);
3364 [(set_attr "length" "8")])
3367 ;; [vldrbq_gather_offset_z_s vldrbq_gather_offset_z_u]
3369 (define_insn "mve_vldrbq_gather_offset_z_<supf><mode>"
3370 [(set (match_operand:MVE_2 0 "s_register_operand" "=&w")
3371 (unspec:MVE_2 [(match_operand:<MVE_B_ELEM> 1 "memory_operand" "Us")
3372 (match_operand:MVE_2 2 "s_register_operand" "w")
3373 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
3379 ops[0] = operands[0];
3380 ops[1] = operands[1];
3381 ops[2] = operands[2];
3382 ops[3] = operands[3];
3383 if (!strcmp ("<supf>","s") && <V_sz_elem> == 8)
3384 output_asm_insn ("vpst\n\tvldrbt.u8\t%q0, [%m1, %q2]",ops);
3386 output_asm_insn ("vpst\n\tvldrbt.<supf><V_sz_elem>\t%q0, [%m1, %q2]",ops);
3389 [(set_attr "length" "8")])
3392 ;; [vldrbq_z_s vldrbq_z_u]
3394 (define_insn "mve_vldrbq_z_<supf><mode>"
3395 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
3396 (unspec:MVE_2 [(match_operand:<MVE_B_ELEM> 1 "mve_memory_operand" "Ux")
3397 (match_operand:<MVE_VPRED> 2 "vpr_register_operand" "Up")]
3403 int regno = REGNO (operands[0]);
3404 ops[0] = gen_rtx_REG (TImode, regno);
3405 ops[1] = operands[1];
3406 if (<V_sz_elem> == 8)
3407 output_asm_insn ("vpst\;vldrbt.<V_sz_elem>\t%q0, %E1",ops);
3409 output_asm_insn ("vpst\;vldrbt.<supf><V_sz_elem>\t%q0, %E1",ops);
3412 [(set_attr "length" "8")])
3415 ;; [vldrwq_gather_base_z_s vldrwq_gather_base_z_u]
3417 (define_insn "mve_vldrwq_gather_base_z_<supf>v4si"
3418 [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
3419 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
3420 (match_operand:SI 2 "immediate_operand" "i")
3421 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
3427 ops[0] = operands[0];
3428 ops[1] = operands[1];
3429 ops[2] = operands[2];
3430 output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%q1, %2]",ops);
3433 [(set_attr "length" "8")])
3438 (define_insn "mve_vldrhq_fv8hf"
3439 [(set (match_operand:V8HF 0 "s_register_operand" "=w")
3440 (unspec:V8HF [(match_operand:V8HI 1 "mve_memory_operand" "Ux")]
3443 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3446 int regno = REGNO (operands[0]);
3447 ops[0] = gen_rtx_REG (TImode, regno);
3448 ops[1] = operands[1];
3449 output_asm_insn ("vldrh.16\t%q0, %E1",ops);
3452 [(set_attr "length" "4")])
3455 ;; [vldrhq_gather_offset_s vldrhq_gather_offset_u]
3457 (define_insn "mve_vldrhq_gather_offset_<supf><mode>"
3458 [(set (match_operand:MVE_5 0 "s_register_operand" "=&w")
3459 (unspec:MVE_5 [(match_operand:<MVE_H_ELEM> 1 "memory_operand" "Us")
3460 (match_operand:MVE_5 2 "s_register_operand" "w")]
3466 ops[0] = operands[0];
3467 ops[1] = operands[1];
3468 ops[2] = operands[2];
3469 if (!strcmp ("<supf>","s") && <V_sz_elem> == 16)
3470 output_asm_insn ("vldrh.u16\t%q0, [%m1, %q2]",ops);
3472 output_asm_insn ("vldrh.<supf><V_sz_elem>\t%q0, [%m1, %q2]",ops);
3475 [(set_attr "length" "4")])
3478 ;; [vldrhq_gather_offset_z_s vldrhq_gather_offset_z_u]
3480 (define_insn "mve_vldrhq_gather_offset_z_<supf><mode>"
3481 [(set (match_operand:MVE_5 0 "s_register_operand" "=&w")
3482 (unspec:MVE_5 [(match_operand:<MVE_H_ELEM> 1 "memory_operand" "Us")
3483 (match_operand:MVE_5 2 "s_register_operand" "w")
3484 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")
3490 ops[0] = operands[0];
3491 ops[1] = operands[1];
3492 ops[2] = operands[2];
3493 ops[3] = operands[3];
3494 if (!strcmp ("<supf>","s") && <V_sz_elem> == 16)
3495 output_asm_insn ("vpst\n\tvldrht.u16\t%q0, [%m1, %q2]",ops);
3497 output_asm_insn ("vpst\n\tvldrht.<supf><V_sz_elem>\t%q0, [%m1, %q2]",ops);
3500 [(set_attr "length" "8")])
3503 ;; [vldrhq_gather_shifted_offset_s vldrhq_gather_shifted_offset_u]
3505 (define_insn "mve_vldrhq_gather_shifted_offset_<supf><mode>"
3506 [(set (match_operand:MVE_5 0 "s_register_operand" "=&w")
3507 (unspec:MVE_5 [(match_operand:<MVE_H_ELEM> 1 "memory_operand" "Us")
3508 (match_operand:MVE_5 2 "s_register_operand" "w")]
3514 ops[0] = operands[0];
3515 ops[1] = operands[1];
3516 ops[2] = operands[2];
3517 if (!strcmp ("<supf>","s") && <V_sz_elem> == 16)
3518 output_asm_insn ("vldrh.u16\t%q0, [%m1, %q2, uxtw #1]",ops);
3520 output_asm_insn ("vldrh.<supf><V_sz_elem>\t%q0, [%m1, %q2, uxtw #1]",ops);
3523 [(set_attr "length" "4")])
3526 ;; [vldrhq_gather_shifted_offset_z_s vldrhq_gather_shited_offset_z_u]
3528 (define_insn "mve_vldrhq_gather_shifted_offset_z_<supf><mode>"
3529 [(set (match_operand:MVE_5 0 "s_register_operand" "=&w")
3530 (unspec:MVE_5 [(match_operand:<MVE_H_ELEM> 1 "memory_operand" "Us")
3531 (match_operand:MVE_5 2 "s_register_operand" "w")
3532 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")
3538 ops[0] = operands[0];
3539 ops[1] = operands[1];
3540 ops[2] = operands[2];
3541 ops[3] = operands[3];
3542 if (!strcmp ("<supf>","s") && <V_sz_elem> == 16)
3543 output_asm_insn ("vpst\n\tvldrht.u16\t%q0, [%m1, %q2, uxtw #1]",ops);
3545 output_asm_insn ("vpst\n\tvldrht.<supf><V_sz_elem>\t%q0, [%m1, %q2, uxtw #1]",ops);
3548 [(set_attr "length" "8")])
3551 ;; [vldrhq_s, vldrhq_u]
3553 (define_insn "mve_vldrhq_<supf><mode>"
3554 [(set (match_operand:MVE_5 0 "s_register_operand" "=w")
3555 (unspec:MVE_5 [(match_operand:<MVE_H_ELEM> 1 "mve_memory_operand" "Ux")]
3561 int regno = REGNO (operands[0]);
3562 ops[0] = gen_rtx_REG (TImode, regno);
3563 ops[1] = operands[1];
3564 if (<V_sz_elem> == 16)
3565 output_asm_insn ("vldrh.16\t%q0, %E1",ops);
3567 output_asm_insn ("vldrh.<supf><V_sz_elem>\t%q0, %E1",ops);
3570 [(set_attr "length" "4")])
3575 (define_insn "mve_vldrhq_z_fv8hf"
3576 [(set (match_operand:V8HF 0 "s_register_operand" "=w")
3577 (unspec:V8HF [(match_operand:V8HI 1 "mve_memory_operand" "Ux")
3578 (match_operand:<MVE_VPRED> 2 "vpr_register_operand" "Up")]
3581 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3584 int regno = REGNO (operands[0]);
3585 ops[0] = gen_rtx_REG (TImode, regno);
3586 ops[1] = operands[1];
3587 output_asm_insn ("vpst\;vldrht.16\t%q0, %E1",ops);
3590 [(set_attr "length" "8")])
3593 ;; [vldrhq_z_s vldrhq_z_u]
3595 (define_insn "mve_vldrhq_z_<supf><mode>"
3596 [(set (match_operand:MVE_5 0 "s_register_operand" "=w")
3597 (unspec:MVE_5 [(match_operand:<MVE_H_ELEM> 1 "mve_memory_operand" "Ux")
3598 (match_operand:<MVE_VPRED> 2 "vpr_register_operand" "Up")]
3604 int regno = REGNO (operands[0]);
3605 ops[0] = gen_rtx_REG (TImode, regno);
3606 ops[1] = operands[1];
3607 if (<V_sz_elem> == 16)
3608 output_asm_insn ("vpst\;vldrht.16\t%q0, %E1",ops);
3610 output_asm_insn ("vpst\;vldrht.<supf><V_sz_elem>\t%q0, %E1",ops);
3613 [(set_attr "length" "8")])
3618 (define_insn "mve_vldrwq_fv4sf"
3619 [(set (match_operand:V4SF 0 "s_register_operand" "=w")
3620 (unspec:V4SF [(match_operand:V4SI 1 "mve_memory_operand" "Ux")]
3623 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3626 int regno = REGNO (operands[0]);
3627 ops[0] = gen_rtx_REG (TImode, regno);
3628 ops[1] = operands[1];
3629 output_asm_insn ("vldrw.32\t%q0, %E1",ops);
3632 [(set_attr "length" "4")])
3635 ;; [vldrwq_s vldrwq_u]
3637 (define_insn "mve_vldrwq_<supf>v4si"
3638 [(set (match_operand:V4SI 0 "s_register_operand" "=w")
3639 (unspec:V4SI [(match_operand:V4SI 1 "mve_memory_operand" "Ux")]
3645 int regno = REGNO (operands[0]);
3646 ops[0] = gen_rtx_REG (TImode, regno);
3647 ops[1] = operands[1];
3648 output_asm_insn ("vldrw.32\t%q0, %E1",ops);
3651 [(set_attr "length" "4")])
3656 (define_insn "mve_vldrwq_z_fv4sf"
3657 [(set (match_operand:V4SF 0 "s_register_operand" "=w")
3658 (unspec:V4SF [(match_operand:V4SI 1 "mve_memory_operand" "Ux")
3659 (match_operand:V4BI 2 "vpr_register_operand" "Up")]
3662 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3665 int regno = REGNO (operands[0]);
3666 ops[0] = gen_rtx_REG (TImode, regno);
3667 ops[1] = operands[1];
3668 output_asm_insn ("vpst\;vldrwt.32\t%q0, %E1",ops);
3671 [(set_attr "length" "8")])
3674 ;; [vldrwq_z_s vldrwq_z_u]
3676 (define_insn "mve_vldrwq_z_<supf>v4si"
3677 [(set (match_operand:V4SI 0 "s_register_operand" "=w")
3678 (unspec:V4SI [(match_operand:V4SI 1 "mve_memory_operand" "Ux")
3679 (match_operand:V4BI 2 "vpr_register_operand" "Up")]
3685 int regno = REGNO (operands[0]);
3686 ops[0] = gen_rtx_REG (TImode, regno);
3687 ops[1] = operands[1];
3688 output_asm_insn ("vpst\;vldrwt.32\t%q0, %E1",ops);
3691 [(set_attr "length" "8")])
3693 (define_expand "mve_vld1q_f<mode>"
3694 [(match_operand:MVE_0 0 "s_register_operand")
3695 (unspec:MVE_0 [(match_operand:<MVE_CNVT> 1 "mve_memory_operand")] VLD1Q_F)
3697 "TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT"
3699 emit_insn (gen_mve_vldr<V_sz_elem1>q_f<mode>(operands[0],operands[1]));
3703 (define_expand "mve_vld1q_<supf><mode>"
3704 [(match_operand:MVE_2 0 "s_register_operand")
3705 (unspec:MVE_2 [(match_operand:MVE_2 1 "mve_memory_operand")] VLD1Q)
3709 emit_insn (gen_mve_vldr<V_sz_elem1>q_<supf><mode>(operands[0],operands[1]));
3714 ;; [vldrdq_gather_base_s vldrdq_gather_base_u]
3716 (define_insn "mve_vldrdq_gather_base_<supf>v2di"
3717 [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
3718 (unspec:V2DI [(match_operand:V2DI 1 "s_register_operand" "w")
3719 (match_operand:SI 2 "immediate_operand" "i")]
3725 ops[0] = operands[0];
3726 ops[1] = operands[1];
3727 ops[2] = operands[2];
3728 output_asm_insn ("vldrd.64\t%q0, [%q1, %2]",ops);
3731 [(set_attr "length" "4")])
3734 ;; [vldrdq_gather_base_z_s vldrdq_gather_base_z_u]
3736 (define_insn "mve_vldrdq_gather_base_z_<supf>v2di"
3737 [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
3738 (unspec:V2DI [(match_operand:V2DI 1 "s_register_operand" "w")
3739 (match_operand:SI 2 "immediate_operand" "i")
3740 (match_operand:V2QI 3 "vpr_register_operand" "Up")]
3746 ops[0] = operands[0];
3747 ops[1] = operands[1];
3748 ops[2] = operands[2];
3749 output_asm_insn ("vpst\n\tvldrdt.u64\t%q0, [%q1, %2]",ops);
3752 [(set_attr "length" "8")])
3755 ;; [vldrdq_gather_offset_s vldrdq_gather_offset_u]
3757 (define_insn "mve_vldrdq_gather_offset_<supf>v2di"
3758 [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
3759 (unspec:V2DI [(match_operand:V2DI 1 "memory_operand" "Us")
3760 (match_operand:V2DI 2 "s_register_operand" "w")]
3766 ops[0] = operands[0];
3767 ops[1] = operands[1];
3768 ops[2] = operands[2];
3769 output_asm_insn ("vldrd.u64\t%q0, [%m1, %q2]",ops);
3772 [(set_attr "length" "4")])
3775 ;; [vldrdq_gather_offset_z_s vldrdq_gather_offset_z_u]
3777 (define_insn "mve_vldrdq_gather_offset_z_<supf>v2di"
3778 [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
3779 (unspec:V2DI [(match_operand:V2DI 1 "memory_operand" "Us")
3780 (match_operand:V2DI 2 "s_register_operand" "w")
3781 (match_operand:V2QI 3 "vpr_register_operand" "Up")]
3787 ops[0] = operands[0];
3788 ops[1] = operands[1];
3789 ops[2] = operands[2];
3790 output_asm_insn ("vpst\n\tvldrdt.u64\t%q0, [%m1, %q2]",ops);
3793 [(set_attr "length" "8")])
3796 ;; [vldrdq_gather_shifted_offset_s vldrdq_gather_shifted_offset_u]
3798 (define_insn "mve_vldrdq_gather_shifted_offset_<supf>v2di"
3799 [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
3800 (unspec:V2DI [(match_operand:V2DI 1 "memory_operand" "Us")
3801 (match_operand:V2DI 2 "s_register_operand" "w")]
3807 ops[0] = operands[0];
3808 ops[1] = operands[1];
3809 ops[2] = operands[2];
3810 output_asm_insn ("vldrd.u64\t%q0, [%m1, %q2, uxtw #3]",ops);
3813 [(set_attr "length" "4")])
3816 ;; [vldrdq_gather_shifted_offset_z_s vldrdq_gather_shifted_offset_z_u]
3818 (define_insn "mve_vldrdq_gather_shifted_offset_z_<supf>v2di"
3819 [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
3820 (unspec:V2DI [(match_operand:V2DI 1 "memory_operand" "Us")
3821 (match_operand:V2DI 2 "s_register_operand" "w")
3822 (match_operand:V2QI 3 "vpr_register_operand" "Up")]
3828 ops[0] = operands[0];
3829 ops[1] = operands[1];
3830 ops[2] = operands[2];
3831 output_asm_insn ("vpst\n\tvldrdt.u64\t%q0, [%m1, %q2, uxtw #3]",ops);
3834 [(set_attr "length" "8")])
3837 ;; [vldrhq_gather_offset_f]
3839 (define_insn "mve_vldrhq_gather_offset_fv8hf"
3840 [(set (match_operand:V8HF 0 "s_register_operand" "=&w")
3841 (unspec:V8HF [(match_operand:V8HI 1 "memory_operand" "Us")
3842 (match_operand:V8HI 2 "s_register_operand" "w")]
3845 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3848 ops[0] = operands[0];
3849 ops[1] = operands[1];
3850 ops[2] = operands[2];
3851 output_asm_insn ("vldrh.f16\t%q0, [%m1, %q2]",ops);
3854 [(set_attr "length" "4")])
3857 ;; [vldrhq_gather_offset_z_f]
3859 (define_insn "mve_vldrhq_gather_offset_z_fv8hf"
3860 [(set (match_operand:V8HF 0 "s_register_operand" "=&w")
3861 (unspec:V8HF [(match_operand:V8HI 1 "memory_operand" "Us")
3862 (match_operand:V8HI 2 "s_register_operand" "w")
3863 (match_operand:V8BI 3 "vpr_register_operand" "Up")]
3866 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3869 ops[0] = operands[0];
3870 ops[1] = operands[1];
3871 ops[2] = operands[2];
3872 ops[3] = operands[3];
3873 output_asm_insn ("vpst\n\tvldrht.f16\t%q0, [%m1, %q2]",ops);
3876 [(set_attr "length" "8")])
3879 ;; [vldrhq_gather_shifted_offset_f]
3881 (define_insn "mve_vldrhq_gather_shifted_offset_fv8hf"
3882 [(set (match_operand:V8HF 0 "s_register_operand" "=&w")
3883 (unspec:V8HF [(match_operand:V8HI 1 "memory_operand" "Us")
3884 (match_operand:V8HI 2 "s_register_operand" "w")]
3887 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3890 ops[0] = operands[0];
3891 ops[1] = operands[1];
3892 ops[2] = operands[2];
3893 output_asm_insn ("vldrh.f16\t%q0, [%m1, %q2, uxtw #1]",ops);
3896 [(set_attr "length" "4")])
3899 ;; [vldrhq_gather_shifted_offset_z_f]
3901 (define_insn "mve_vldrhq_gather_shifted_offset_z_fv8hf"
3902 [(set (match_operand:V8HF 0 "s_register_operand" "=&w")
3903 (unspec:V8HF [(match_operand:V8HI 1 "memory_operand" "Us")
3904 (match_operand:V8HI 2 "s_register_operand" "w")
3905 (match_operand:V8BI 3 "vpr_register_operand" "Up")]
3908 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3911 ops[0] = operands[0];
3912 ops[1] = operands[1];
3913 ops[2] = operands[2];
3914 ops[3] = operands[3];
3915 output_asm_insn ("vpst\n\tvldrht.f16\t%q0, [%m1, %q2, uxtw #1]",ops);
3918 [(set_attr "length" "8")])
3921 ;; [vldrwq_gather_base_f]
3923 (define_insn "mve_vldrwq_gather_base_fv4sf"
3924 [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
3925 (unspec:V4SF [(match_operand:V4SI 1 "s_register_operand" "w")
3926 (match_operand:SI 2 "immediate_operand" "i")]
3929 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3932 ops[0] = operands[0];
3933 ops[1] = operands[1];
3934 ops[2] = operands[2];
3935 output_asm_insn ("vldrw.u32\t%q0, [%q1, %2]",ops);
3938 [(set_attr "length" "4")])
3941 ;; [vldrwq_gather_base_z_f]
3943 (define_insn "mve_vldrwq_gather_base_z_fv4sf"
3944 [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
3945 (unspec:V4SF [(match_operand:V4SI 1 "s_register_operand" "w")
3946 (match_operand:SI 2 "immediate_operand" "i")
3947 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
3950 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3953 ops[0] = operands[0];
3954 ops[1] = operands[1];
3955 ops[2] = operands[2];
3956 output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%q1, %2]",ops);
3959 [(set_attr "length" "8")])
3962 ;; [vldrwq_gather_offset_f]
3964 (define_insn "mve_vldrwq_gather_offset_fv4sf"
3965 [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
3966 (unspec:V4SF [(match_operand:V4SI 1 "memory_operand" "Us")
3967 (match_operand:V4SI 2 "s_register_operand" "w")]
3970 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
3973 ops[0] = operands[0];
3974 ops[1] = operands[1];
3975 ops[2] = operands[2];
3976 output_asm_insn ("vldrw.u32\t%q0, [%m1, %q2]",ops);
3979 [(set_attr "length" "4")])
3982 ;; [vldrwq_gather_offset_s vldrwq_gather_offset_u]
3984 (define_insn "mve_vldrwq_gather_offset_<supf>v4si"
3985 [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
3986 (unspec:V4SI [(match_operand:V4SI 1 "memory_operand" "Us")
3987 (match_operand:V4SI 2 "s_register_operand" "w")]
3993 ops[0] = operands[0];
3994 ops[1] = operands[1];
3995 ops[2] = operands[2];
3996 output_asm_insn ("vldrw.u32\t%q0, [%m1, %q2]",ops);
3999 [(set_attr "length" "4")])
4002 ;; [vldrwq_gather_offset_z_f]
4004 (define_insn "mve_vldrwq_gather_offset_z_fv4sf"
4005 [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
4006 (unspec:V4SF [(match_operand:V4SI 1 "memory_operand" "Us")
4007 (match_operand:V4SI 2 "s_register_operand" "w")
4008 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
4011 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4014 ops[0] = operands[0];
4015 ops[1] = operands[1];
4016 ops[2] = operands[2];
4017 ops[3] = operands[3];
4018 output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%m1, %q2]",ops);
4021 [(set_attr "length" "8")])
4024 ;; [vldrwq_gather_offset_z_s vldrwq_gather_offset_z_u]
4026 (define_insn "mve_vldrwq_gather_offset_z_<supf>v4si"
4027 [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
4028 (unspec:V4SI [(match_operand:V4SI 1 "memory_operand" "Us")
4029 (match_operand:V4SI 2 "s_register_operand" "w")
4030 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
4036 ops[0] = operands[0];
4037 ops[1] = operands[1];
4038 ops[2] = operands[2];
4039 ops[3] = operands[3];
4040 output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%m1, %q2]",ops);
4043 [(set_attr "length" "8")])
4046 ;; [vldrwq_gather_shifted_offset_f]
4048 (define_insn "mve_vldrwq_gather_shifted_offset_fv4sf"
4049 [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
4050 (unspec:V4SF [(match_operand:V4SI 1 "memory_operand" "Us")
4051 (match_operand:V4SI 2 "s_register_operand" "w")]
4054 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4057 ops[0] = operands[0];
4058 ops[1] = operands[1];
4059 ops[2] = operands[2];
4060 output_asm_insn ("vldrw.u32\t%q0, [%m1, %q2, uxtw #2]",ops);
4063 [(set_attr "length" "4")])
4066 ;; [vldrwq_gather_shifted_offset_s vldrwq_gather_shifted_offset_u]
4068 (define_insn "mve_vldrwq_gather_shifted_offset_<supf>v4si"
4069 [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
4070 (unspec:V4SI [(match_operand:V4SI 1 "memory_operand" "Us")
4071 (match_operand:V4SI 2 "s_register_operand" "w")]
4077 ops[0] = operands[0];
4078 ops[1] = operands[1];
4079 ops[2] = operands[2];
4080 output_asm_insn ("vldrw.u32\t%q0, [%m1, %q2, uxtw #2]",ops);
4083 [(set_attr "length" "4")])
4086 ;; [vldrwq_gather_shifted_offset_z_f]
4088 (define_insn "mve_vldrwq_gather_shifted_offset_z_fv4sf"
4089 [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
4090 (unspec:V4SF [(match_operand:V4SI 1 "memory_operand" "Us")
4091 (match_operand:V4SI 2 "s_register_operand" "w")
4092 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
4095 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4098 ops[0] = operands[0];
4099 ops[1] = operands[1];
4100 ops[2] = operands[2];
4101 ops[3] = operands[3];
4102 output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%m1, %q2, uxtw #2]",ops);
4105 [(set_attr "length" "8")])
4108 ;; [vldrwq_gather_shifted_offset_z_s vldrwq_gather_shifted_offset_z_u]
4110 (define_insn "mve_vldrwq_gather_shifted_offset_z_<supf>v4si"
4111 [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
4112 (unspec:V4SI [(match_operand:V4SI 1 "memory_operand" "Us")
4113 (match_operand:V4SI 2 "s_register_operand" "w")
4114 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
4120 ops[0] = operands[0];
4121 ops[1] = operands[1];
4122 ops[2] = operands[2];
4123 ops[3] = operands[3];
4124 output_asm_insn ("vpst\n\tvldrwt.u32\t%q0, [%m1, %q2, uxtw #2]",ops);
4127 [(set_attr "length" "8")])
4132 (define_insn "mve_vstrhq_fv8hf"
4133 [(set (match_operand:V8HI 0 "mve_memory_operand" "=Ux")
4134 (unspec:V8HI [(match_operand:V8HF 1 "s_register_operand" "w")]
4137 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4140 int regno = REGNO (operands[1]);
4141 ops[1] = gen_rtx_REG (TImode, regno);
4142 ops[0] = operands[0];
4143 output_asm_insn ("vstrh.16\t%q1, %E0",ops);
4146 [(set_attr "length" "4")])
4151 (define_insn "mve_vstrhq_p_fv8hf"
4152 [(set (match_operand:V8HI 0 "mve_memory_operand" "=Ux")
4154 [(match_operand:V8HF 1 "s_register_operand" "w")
4155 (match_operand:V8BI 2 "vpr_register_operand" "Up")
4158 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4161 int regno = REGNO (operands[1]);
4162 ops[1] = gen_rtx_REG (TImode, regno);
4163 ops[0] = operands[0];
4164 output_asm_insn ("vpst\;vstrht.16\t%q1, %E0",ops);
4167 [(set_attr "length" "8")])
4170 ;; [vstrhq_p_s vstrhq_p_u]
4172 (define_insn "mve_vstrhq_p_<supf><mode>"
4173 [(set (match_operand:<MVE_H_ELEM> 0 "mve_memory_operand" "=Ux")
4174 (unspec:<MVE_H_ELEM>
4175 [(match_operand:MVE_5 1 "s_register_operand" "w")
4176 (match_operand:<MVE_VPRED> 2 "vpr_register_operand" "Up")
4183 int regno = REGNO (operands[1]);
4184 ops[1] = gen_rtx_REG (TImode, regno);
4185 ops[0] = operands[0];
4186 output_asm_insn ("vpst\;vstrht.<V_sz_elem>\t%q1, %E0",ops);
4189 [(set_attr "length" "8")])
4192 ;; [vstrhq_scatter_offset_p_s vstrhq_scatter_offset_p_u]
4194 (define_expand "mve_vstrhq_scatter_offset_p_<supf><mode>"
4195 [(match_operand:<MVE_H_ELEM> 0 "mve_scatter_memory")
4196 (match_operand:MVE_5 1 "s_register_operand")
4197 (match_operand:MVE_5 2 "s_register_operand")
4198 (match_operand:<MVE_VPRED> 3 "vpr_register_operand")
4199 (unspec:V4SI [(const_int 0)] VSTRHSOQ)]
4202 rtx ind = XEXP (operands[0], 0);
4203 gcc_assert (REG_P (ind));
4205 gen_mve_vstrhq_scatter_offset_p_<supf><mode>_insn (ind, operands[1],
4211 (define_insn "mve_vstrhq_scatter_offset_p_<supf><mode>_insn"
4212 [(set (mem:BLK (scratch))
4214 [(match_operand:SI 0 "register_operand" "r")
4215 (match_operand:MVE_5 1 "s_register_operand" "w")
4216 (match_operand:MVE_5 2 "s_register_operand" "w")
4217 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
4220 "vpst\;vstrht.<V_sz_elem>\t%q2, [%0, %q1]"
4221 [(set_attr "length" "8")])
4224 ;; [vstrhq_scatter_offset_s vstrhq_scatter_offset_u]
4226 (define_expand "mve_vstrhq_scatter_offset_<supf><mode>"
4227 [(match_operand:<MVE_H_ELEM> 0 "mve_scatter_memory")
4228 (match_operand:MVE_5 1 "s_register_operand")
4229 (match_operand:MVE_5 2 "s_register_operand")
4230 (unspec:V4SI [(const_int 0)] VSTRHSOQ)]
4233 rtx ind = XEXP (operands[0], 0);
4234 gcc_assert (REG_P (ind));
4235 emit_insn (gen_mve_vstrhq_scatter_offset_<supf><mode>_insn (ind, operands[1],
4240 (define_insn "mve_vstrhq_scatter_offset_<supf><mode>_insn"
4241 [(set (mem:BLK (scratch))
4243 [(match_operand:SI 0 "register_operand" "r")
4244 (match_operand:MVE_5 1 "s_register_operand" "w")
4245 (match_operand:MVE_5 2 "s_register_operand" "w")]
4248 "vstrh.<V_sz_elem>\t%q2, [%0, %q1]"
4249 [(set_attr "length" "4")])
4252 ;; [vstrhq_scatter_shifted_offset_p_s vstrhq_scatter_shifted_offset_p_u]
4254 (define_expand "mve_vstrhq_scatter_shifted_offset_p_<supf><mode>"
4255 [(match_operand:<MVE_H_ELEM> 0 "mve_scatter_memory")
4256 (match_operand:MVE_5 1 "s_register_operand")
4257 (match_operand:MVE_5 2 "s_register_operand")
4258 (match_operand:<MVE_VPRED> 3 "vpr_register_operand")
4259 (unspec:V4SI [(const_int 0)] VSTRHSSOQ)]
4262 rtx ind = XEXP (operands[0], 0);
4263 gcc_assert (REG_P (ind));
4265 gen_mve_vstrhq_scatter_shifted_offset_p_<supf><mode>_insn (ind, operands[1],
4271 (define_insn "mve_vstrhq_scatter_shifted_offset_p_<supf><mode>_insn"
4272 [(set (mem:BLK (scratch))
4274 [(match_operand:SI 0 "register_operand" "r")
4275 (match_operand:MVE_5 1 "s_register_operand" "w")
4276 (match_operand:MVE_5 2 "s_register_operand" "w")
4277 (match_operand:<MVE_VPRED> 3 "vpr_register_operand" "Up")]
4280 "vpst\;vstrht.<V_sz_elem>\t%q2, [%0, %q1, uxtw #1]"
4281 [(set_attr "length" "8")])
4284 ;; [vstrhq_scatter_shifted_offset_s vstrhq_scatter_shifted_offset_u]
4286 (define_expand "mve_vstrhq_scatter_shifted_offset_<supf><mode>"
4287 [(match_operand:<MVE_H_ELEM> 0 "mve_scatter_memory")
4288 (match_operand:MVE_5 1 "s_register_operand")
4289 (match_operand:MVE_5 2 "s_register_operand")
4290 (unspec:V4SI [(const_int 0)] VSTRHSSOQ)]
4293 rtx ind = XEXP (operands[0], 0);
4294 gcc_assert (REG_P (ind));
4296 gen_mve_vstrhq_scatter_shifted_offset_<supf><mode>_insn (ind, operands[1],
4301 (define_insn "mve_vstrhq_scatter_shifted_offset_<supf><mode>_insn"
4302 [(set (mem:BLK (scratch))
4304 [(match_operand:SI 0 "register_operand" "r")
4305 (match_operand:MVE_5 1 "s_register_operand" "w")
4306 (match_operand:MVE_5 2 "s_register_operand" "w")]
4309 "vstrh.<V_sz_elem>\t%q2, [%0, %q1, uxtw #1]"
4310 [(set_attr "length" "4")])
4313 ;; [vstrhq_s, vstrhq_u]
4315 (define_insn "mve_vstrhq_<supf><mode>"
4316 [(set (match_operand:<MVE_H_ELEM> 0 "mve_memory_operand" "=Ux")
4317 (unspec:<MVE_H_ELEM> [(match_operand:MVE_5 1 "s_register_operand" "w")]
4323 int regno = REGNO (operands[1]);
4324 ops[1] = gen_rtx_REG (TImode, regno);
4325 ops[0] = operands[0];
4326 output_asm_insn ("vstrh.<V_sz_elem>\t%q1, %E0",ops);
4329 [(set_attr "length" "4")])
4334 (define_insn "mve_vstrwq_fv4sf"
4335 [(set (match_operand:V4SI 0 "mve_memory_operand" "=Ux")
4336 (unspec:V4SI [(match_operand:V4SF 1 "s_register_operand" "w")]
4339 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4342 int regno = REGNO (operands[1]);
4343 ops[1] = gen_rtx_REG (TImode, regno);
4344 ops[0] = operands[0];
4345 output_asm_insn ("vstrw.32\t%q1, %E0",ops);
4348 [(set_attr "length" "4")])
4353 (define_insn "mve_vstrwq_p_fv4sf"
4354 [(set (match_operand:V4SI 0 "mve_memory_operand" "=Ux")
4356 [(match_operand:V4SF 1 "s_register_operand" "w")
4357 (match_operand:<MVE_VPRED> 2 "vpr_register_operand" "Up")
4360 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4363 int regno = REGNO (operands[1]);
4364 ops[1] = gen_rtx_REG (TImode, regno);
4365 ops[0] = operands[0];
4366 output_asm_insn ("vpst\;vstrwt.32\t%q1, %E0",ops);
4369 [(set_attr "length" "8")])
4372 ;; [vstrwq_p_s vstrwq_p_u]
4374 (define_insn "mve_vstrwq_p_<supf>v4si"
4375 [(set (match_operand:V4SI 0 "mve_memory_operand" "=Ux")
4377 [(match_operand:V4SI 1 "s_register_operand" "w")
4378 (match_operand:V4BI 2 "vpr_register_operand" "Up")
4384 int regno = REGNO (operands[1]);
4385 ops[1] = gen_rtx_REG (TImode, regno);
4386 ops[0] = operands[0];
4387 output_asm_insn ("vpst\;vstrwt.32\t%q1, %E0",ops);
4390 [(set_attr "length" "8")])
4393 ;; [vstrwq_s vstrwq_u]
4395 (define_insn "mve_vstrwq_<supf>v4si"
4396 [(set (match_operand:V4SI 0 "mve_memory_operand" "=Ux")
4397 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")]
4403 int regno = REGNO (operands[1]);
4404 ops[1] = gen_rtx_REG (TImode, regno);
4405 ops[0] = operands[0];
4406 output_asm_insn ("vstrw.32\t%q1, %E0",ops);
4409 [(set_attr "length" "4")])
4411 (define_expand "mve_vst1q_f<mode>"
4412 [(match_operand:<MVE_CNVT> 0 "mve_memory_operand")
4413 (unspec:<MVE_CNVT> [(match_operand:MVE_0 1 "s_register_operand")] VST1Q_F)
4415 "TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT"
4417 emit_insn (gen_mve_vstr<V_sz_elem1>q_f<mode>(operands[0],operands[1]));
4421 (define_expand "mve_vst1q_<supf><mode>"
4422 [(match_operand:MVE_2 0 "mve_memory_operand")
4423 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand")] VST1Q)
4427 emit_insn (gen_mve_vstr<V_sz_elem1>q_<supf><mode>(operands[0],operands[1]));
4432 ;; [vstrdq_scatter_base_p_s vstrdq_scatter_base_p_u]
4434 (define_insn "mve_vstrdq_scatter_base_p_<supf>v2di"
4435 [(set (mem:BLK (scratch))
4437 [(match_operand:V2DI 0 "s_register_operand" "w")
4438 (match_operand:SI 1 "mve_vldrd_immediate" "Ri")
4439 (match_operand:V2DI 2 "s_register_operand" "w")
4440 (match_operand:V2QI 3 "vpr_register_operand" "Up")]
4446 ops[0] = operands[0];
4447 ops[1] = operands[1];
4448 ops[2] = operands[2];
4449 output_asm_insn ("vpst\;\tvstrdt.u64\t%q2, [%q0, %1]",ops);
4452 [(set_attr "length" "8")])
4455 ;; [vstrdq_scatter_base_s vstrdq_scatter_base_u]
4457 (define_insn "mve_vstrdq_scatter_base_<supf>v2di"
4458 [(set (mem:BLK (scratch))
4460 [(match_operand:V2DI 0 "s_register_operand" "=w")
4461 (match_operand:SI 1 "mve_vldrd_immediate" "Ri")
4462 (match_operand:V2DI 2 "s_register_operand" "w")]
4468 ops[0] = operands[0];
4469 ops[1] = operands[1];
4470 ops[2] = operands[2];
4471 output_asm_insn ("vstrd.u64\t%q2, [%q0, %1]",ops);
4474 [(set_attr "length" "4")])
4477 ;; [vstrdq_scatter_offset_p_s vstrdq_scatter_offset_p_u]
4479 (define_expand "mve_vstrdq_scatter_offset_p_<supf>v2di"
4480 [(match_operand:V2DI 0 "mve_scatter_memory")
4481 (match_operand:V2DI 1 "s_register_operand")
4482 (match_operand:V2DI 2 "s_register_operand")
4483 (match_operand:V2QI 3 "vpr_register_operand")
4484 (unspec:V4SI [(const_int 0)] VSTRDSOQ)]
4487 rtx ind = XEXP (operands[0], 0);
4488 gcc_assert (REG_P (ind));
4489 emit_insn (gen_mve_vstrdq_scatter_offset_p_<supf>v2di_insn (ind, operands[1],
4495 (define_insn "mve_vstrdq_scatter_offset_p_<supf>v2di_insn"
4496 [(set (mem:BLK (scratch))
4498 [(match_operand:SI 0 "register_operand" "r")
4499 (match_operand:V2DI 1 "s_register_operand" "w")
4500 (match_operand:V2DI 2 "s_register_operand" "w")
4501 (match_operand:V2QI 3 "vpr_register_operand" "Up")]
4504 "vpst\;vstrdt.64\t%q2, [%0, %q1]"
4505 [(set_attr "length" "8")])
4508 ;; [vstrdq_scatter_offset_s vstrdq_scatter_offset_u]
4510 (define_expand "mve_vstrdq_scatter_offset_<supf>v2di"
4511 [(match_operand:V2DI 0 "mve_scatter_memory")
4512 (match_operand:V2DI 1 "s_register_operand")
4513 (match_operand:V2DI 2 "s_register_operand")
4514 (unspec:V4SI [(const_int 0)] VSTRDSOQ)]
4517 rtx ind = XEXP (operands[0], 0);
4518 gcc_assert (REG_P (ind));
4519 emit_insn (gen_mve_vstrdq_scatter_offset_<supf>v2di_insn (ind, operands[1],
4524 (define_insn "mve_vstrdq_scatter_offset_<supf>v2di_insn"
4525 [(set (mem:BLK (scratch))
4527 [(match_operand:SI 0 "register_operand" "r")
4528 (match_operand:V2DI 1 "s_register_operand" "w")
4529 (match_operand:V2DI 2 "s_register_operand" "w")]
4532 "vstrd.64\t%q2, [%0, %q1]"
4533 [(set_attr "length" "4")])
4536 ;; [vstrdq_scatter_shifted_offset_p_s vstrdq_scatter_shifted_offset_p_u]
4538 (define_expand "mve_vstrdq_scatter_shifted_offset_p_<supf>v2di"
4539 [(match_operand:V2DI 0 "mve_scatter_memory")
4540 (match_operand:V2DI 1 "s_register_operand")
4541 (match_operand:V2DI 2 "s_register_operand")
4542 (match_operand:V2QI 3 "vpr_register_operand")
4543 (unspec:V4SI [(const_int 0)] VSTRDSSOQ)]
4546 rtx ind = XEXP (operands[0], 0);
4547 gcc_assert (REG_P (ind));
4549 gen_mve_vstrdq_scatter_shifted_offset_p_<supf>v2di_insn (ind, operands[1],
4555 (define_insn "mve_vstrdq_scatter_shifted_offset_p_<supf>v2di_insn"
4556 [(set (mem:BLK (scratch))
4558 [(match_operand:SI 0 "register_operand" "r")
4559 (match_operand:V2DI 1 "s_register_operand" "w")
4560 (match_operand:V2DI 2 "s_register_operand" "w")
4561 (match_operand:V2QI 3 "vpr_register_operand" "Up")]
4564 "vpst\;vstrdt.64\t%q2, [%0, %q1, uxtw #3]"
4565 [(set_attr "length" "8")])
4568 ;; [vstrdq_scatter_shifted_offset_s vstrdq_scatter_shifted_offset_u]
4570 (define_expand "mve_vstrdq_scatter_shifted_offset_<supf>v2di"
4571 [(match_operand:V2DI 0 "mve_scatter_memory")
4572 (match_operand:V2DI 1 "s_register_operand")
4573 (match_operand:V2DI 2 "s_register_operand")
4574 (unspec:V4SI [(const_int 0)] VSTRDSSOQ)]
4577 rtx ind = XEXP (operands[0], 0);
4578 gcc_assert (REG_P (ind));
4580 gen_mve_vstrdq_scatter_shifted_offset_<supf>v2di_insn (ind, operands[1],
4585 (define_insn "mve_vstrdq_scatter_shifted_offset_<supf>v2di_insn"
4586 [(set (mem:BLK (scratch))
4588 [(match_operand:SI 0 "register_operand" "r")
4589 (match_operand:V2DI 1 "s_register_operand" "w")
4590 (match_operand:V2DI 2 "s_register_operand" "w")]
4593 "vstrd.64\t%q2, [%0, %q1, uxtw #3]"
4594 [(set_attr "length" "4")])
4597 ;; [vstrhq_scatter_offset_f]
4599 (define_expand "mve_vstrhq_scatter_offset_fv8hf"
4600 [(match_operand:V8HI 0 "mve_scatter_memory")
4601 (match_operand:V8HI 1 "s_register_operand")
4602 (match_operand:V8HF 2 "s_register_operand")
4603 (unspec:V4SI [(const_int 0)] VSTRHQSO_F)]
4604 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4606 rtx ind = XEXP (operands[0], 0);
4607 gcc_assert (REG_P (ind));
4608 emit_insn (gen_mve_vstrhq_scatter_offset_fv8hf_insn (ind, operands[1],
4613 (define_insn "mve_vstrhq_scatter_offset_fv8hf_insn"
4614 [(set (mem:BLK (scratch))
4616 [(match_operand:SI 0 "register_operand" "r")
4617 (match_operand:V8HI 1 "s_register_operand" "w")
4618 (match_operand:V8HF 2 "s_register_operand" "w")]
4620 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4621 "vstrh.16\t%q2, [%0, %q1]"
4622 [(set_attr "length" "4")])
4625 ;; [vstrhq_scatter_offset_p_f]
4627 (define_expand "mve_vstrhq_scatter_offset_p_fv8hf"
4628 [(match_operand:V8HI 0 "mve_scatter_memory")
4629 (match_operand:V8HI 1 "s_register_operand")
4630 (match_operand:V8HF 2 "s_register_operand")
4631 (match_operand:V8BI 3 "vpr_register_operand")
4632 (unspec:V4SI [(const_int 0)] VSTRHQSO_F)]
4633 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4635 rtx ind = XEXP (operands[0], 0);
4636 gcc_assert (REG_P (ind));
4637 emit_insn (gen_mve_vstrhq_scatter_offset_p_fv8hf_insn (ind, operands[1],
4643 (define_insn "mve_vstrhq_scatter_offset_p_fv8hf_insn"
4644 [(set (mem:BLK (scratch))
4646 [(match_operand:SI 0 "register_operand" "r")
4647 (match_operand:V8HI 1 "s_register_operand" "w")
4648 (match_operand:V8HF 2 "s_register_operand" "w")
4649 (match_operand:V8BI 3 "vpr_register_operand" "Up")]
4651 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4652 "vpst\;vstrht.16\t%q2, [%0, %q1]"
4653 [(set_attr "length" "8")])
4656 ;; [vstrhq_scatter_shifted_offset_f]
4658 (define_expand "mve_vstrhq_scatter_shifted_offset_fv8hf"
4659 [(match_operand:V8HI 0 "memory_operand" "=Us")
4660 (match_operand:V8HI 1 "s_register_operand" "w")
4661 (match_operand:V8HF 2 "s_register_operand" "w")
4662 (unspec:V4SI [(const_int 0)] VSTRHQSSO_F)]
4663 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4665 rtx ind = XEXP (operands[0], 0);
4666 gcc_assert (REG_P (ind));
4667 emit_insn (gen_mve_vstrhq_scatter_shifted_offset_fv8hf_insn (ind, operands[1],
4672 (define_insn "mve_vstrhq_scatter_shifted_offset_fv8hf_insn"
4673 [(set (mem:BLK (scratch))
4675 [(match_operand:SI 0 "register_operand" "r")
4676 (match_operand:V8HI 1 "s_register_operand" "w")
4677 (match_operand:V8HF 2 "s_register_operand" "w")]
4679 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4680 "vstrh.16\t%q2, [%0, %q1, uxtw #1]"
4681 [(set_attr "length" "4")])
4684 ;; [vstrhq_scatter_shifted_offset_p_f]
4686 (define_expand "mve_vstrhq_scatter_shifted_offset_p_fv8hf"
4687 [(match_operand:V8HI 0 "memory_operand" "=Us")
4688 (match_operand:V8HI 1 "s_register_operand" "w")
4689 (match_operand:V8HF 2 "s_register_operand" "w")
4690 (match_operand:V8BI 3 "vpr_register_operand" "Up")
4691 (unspec:V4SI [(const_int 0)] VSTRHQSSO_F)]
4692 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4694 rtx ind = XEXP (operands[0], 0);
4695 gcc_assert (REG_P (ind));
4697 gen_mve_vstrhq_scatter_shifted_offset_p_fv8hf_insn (ind, operands[1],
4703 (define_insn "mve_vstrhq_scatter_shifted_offset_p_fv8hf_insn"
4704 [(set (mem:BLK (scratch))
4706 [(match_operand:SI 0 "register_operand" "r")
4707 (match_operand:V8HI 1 "s_register_operand" "w")
4708 (match_operand:V8HF 2 "s_register_operand" "w")
4709 (match_operand:V8BI 3 "vpr_register_operand" "Up")]
4711 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4712 "vpst\;vstrht.16\t%q2, [%0, %q1, uxtw #1]"
4713 [(set_attr "length" "8")])
4716 ;; [vstrwq_scatter_base_f]
4718 (define_insn "mve_vstrwq_scatter_base_fv4sf"
4719 [(set (mem:BLK (scratch))
4721 [(match_operand:V4SI 0 "s_register_operand" "w")
4722 (match_operand:SI 1 "immediate_operand" "i")
4723 (match_operand:V4SF 2 "s_register_operand" "w")]
4726 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4729 ops[0] = operands[0];
4730 ops[1] = operands[1];
4731 ops[2] = operands[2];
4732 output_asm_insn ("vstrw.u32\t%q2, [%q0, %1]",ops);
4735 [(set_attr "length" "4")])
4738 ;; [vstrwq_scatter_base_p_f]
4740 (define_insn "mve_vstrwq_scatter_base_p_fv4sf"
4741 [(set (mem:BLK (scratch))
4743 [(match_operand:V4SI 0 "s_register_operand" "w")
4744 (match_operand:SI 1 "immediate_operand" "i")
4745 (match_operand:V4SF 2 "s_register_operand" "w")
4746 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
4749 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4752 ops[0] = operands[0];
4753 ops[1] = operands[1];
4754 ops[2] = operands[2];
4755 output_asm_insn ("vpst\n\tvstrwt.u32\t%q2, [%q0, %1]",ops);
4758 [(set_attr "length" "8")])
4761 ;; [vstrwq_scatter_offset_f]
4763 (define_expand "mve_vstrwq_scatter_offset_fv4sf"
4764 [(match_operand:V4SI 0 "mve_scatter_memory")
4765 (match_operand:V4SI 1 "s_register_operand")
4766 (match_operand:V4SF 2 "s_register_operand")
4767 (unspec:V4SI [(const_int 0)] VSTRWQSO_F)]
4768 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4770 rtx ind = XEXP (operands[0], 0);
4771 gcc_assert (REG_P (ind));
4772 emit_insn (gen_mve_vstrwq_scatter_offset_fv4sf_insn (ind, operands[1],
4777 (define_insn "mve_vstrwq_scatter_offset_fv4sf_insn"
4778 [(set (mem:BLK (scratch))
4780 [(match_operand:SI 0 "register_operand" "r")
4781 (match_operand:V4SI 1 "s_register_operand" "w")
4782 (match_operand:V4SF 2 "s_register_operand" "w")]
4784 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4785 "vstrw.32\t%q2, [%0, %q1]"
4786 [(set_attr "length" "4")])
4789 ;; [vstrwq_scatter_offset_p_f]
4791 (define_expand "mve_vstrwq_scatter_offset_p_fv4sf"
4792 [(match_operand:V4SI 0 "mve_scatter_memory")
4793 (match_operand:V4SI 1 "s_register_operand")
4794 (match_operand:V4SF 2 "s_register_operand")
4795 (match_operand:V4BI 3 "vpr_register_operand")
4796 (unspec:V4SI [(const_int 0)] VSTRWQSO_F)]
4797 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4799 rtx ind = XEXP (operands[0], 0);
4800 gcc_assert (REG_P (ind));
4801 emit_insn (gen_mve_vstrwq_scatter_offset_p_fv4sf_insn (ind, operands[1],
4807 (define_insn "mve_vstrwq_scatter_offset_p_fv4sf_insn"
4808 [(set (mem:BLK (scratch))
4810 [(match_operand:SI 0 "register_operand" "r")
4811 (match_operand:V4SI 1 "s_register_operand" "w")
4812 (match_operand:V4SF 2 "s_register_operand" "w")
4813 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
4815 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4816 "vpst\;vstrwt.32\t%q2, [%0, %q1]"
4817 [(set_attr "length" "8")])
4820 ;; [vstrwq_scatter_offset_s vstrwq_scatter_offset_u]
4822 (define_expand "mve_vstrwq_scatter_offset_p_<supf>v4si"
4823 [(match_operand:V4SI 0 "mve_scatter_memory")
4824 (match_operand:V4SI 1 "s_register_operand")
4825 (match_operand:V4SI 2 "s_register_operand")
4826 (match_operand:V4BI 3 "vpr_register_operand")
4827 (unspec:V4SI [(const_int 0)] VSTRWSOQ)]
4830 rtx ind = XEXP (operands[0], 0);
4831 gcc_assert (REG_P (ind));
4832 emit_insn (gen_mve_vstrwq_scatter_offset_p_<supf>v4si_insn (ind, operands[1],
4838 (define_insn "mve_vstrwq_scatter_offset_p_<supf>v4si_insn"
4839 [(set (mem:BLK (scratch))
4841 [(match_operand:SI 0 "register_operand" "r")
4842 (match_operand:V4SI 1 "s_register_operand" "w")
4843 (match_operand:V4SI 2 "s_register_operand" "w")
4844 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
4847 "vpst\;vstrwt.32\t%q2, [%0, %q1]"
4848 [(set_attr "length" "8")])
4851 ;; [vstrwq_scatter_offset_s vstrwq_scatter_offset_u]
4853 (define_expand "mve_vstrwq_scatter_offset_<supf>v4si"
4854 [(match_operand:V4SI 0 "mve_scatter_memory")
4855 (match_operand:V4SI 1 "s_register_operand")
4856 (match_operand:V4SI 2 "s_register_operand")
4857 (unspec:V4SI [(const_int 0)] VSTRWSOQ)]
4860 rtx ind = XEXP (operands[0], 0);
4861 gcc_assert (REG_P (ind));
4862 emit_insn (gen_mve_vstrwq_scatter_offset_<supf>v4si_insn (ind, operands[1],
4867 (define_insn "mve_vstrwq_scatter_offset_<supf>v4si_insn"
4868 [(set (mem:BLK (scratch))
4870 [(match_operand:SI 0 "register_operand" "r")
4871 (match_operand:V4SI 1 "s_register_operand" "w")
4872 (match_operand:V4SI 2 "s_register_operand" "w")]
4875 "vstrw.32\t%q2, [%0, %q1]"
4876 [(set_attr "length" "4")])
4879 ;; [vstrwq_scatter_shifted_offset_f]
4881 (define_expand "mve_vstrwq_scatter_shifted_offset_fv4sf"
4882 [(match_operand:V4SI 0 "mve_scatter_memory")
4883 (match_operand:V4SI 1 "s_register_operand")
4884 (match_operand:V4SF 2 "s_register_operand")
4885 (unspec:V4SI [(const_int 0)] VSTRWQSSO_F)]
4886 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4888 rtx ind = XEXP (operands[0], 0);
4889 gcc_assert (REG_P (ind));
4890 emit_insn (gen_mve_vstrwq_scatter_shifted_offset_fv4sf_insn (ind, operands[1],
4895 (define_insn "mve_vstrwq_scatter_shifted_offset_fv4sf_insn"
4896 [(set (mem:BLK (scratch))
4898 [(match_operand:SI 0 "register_operand" "r")
4899 (match_operand:V4SI 1 "s_register_operand" "w")
4900 (match_operand:V4SF 2 "s_register_operand" "w")]
4902 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4903 "vstrw.32\t%q2, [%0, %q1, uxtw #2]"
4904 [(set_attr "length" "8")])
4907 ;; [vstrwq_scatter_shifted_offset_p_f]
4909 (define_expand "mve_vstrwq_scatter_shifted_offset_p_fv4sf"
4910 [(match_operand:V4SI 0 "mve_scatter_memory")
4911 (match_operand:V4SI 1 "s_register_operand")
4912 (match_operand:V4SF 2 "s_register_operand")
4913 (match_operand:V4BI 3 "vpr_register_operand")
4914 (unspec:V4SI [(const_int 0)] VSTRWQSSO_F)]
4915 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4917 rtx ind = XEXP (operands[0], 0);
4918 gcc_assert (REG_P (ind));
4920 gen_mve_vstrwq_scatter_shifted_offset_p_fv4sf_insn (ind, operands[1],
4926 (define_insn "mve_vstrwq_scatter_shifted_offset_p_fv4sf_insn"
4927 [(set (mem:BLK (scratch))
4929 [(match_operand:SI 0 "register_operand" "r")
4930 (match_operand:V4SI 1 "s_register_operand" "w")
4931 (match_operand:V4SF 2 "s_register_operand" "w")
4932 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
4934 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
4935 "vpst\;vstrwt.32\t%q2, [%0, %q1, uxtw #2]"
4936 [(set_attr "length" "8")])
4939 ;; [vstrwq_scatter_shifted_offset_p_s vstrwq_scatter_shifted_offset_p_u]
4941 (define_expand "mve_vstrwq_scatter_shifted_offset_p_<supf>v4si"
4942 [(match_operand:V4SI 0 "mve_scatter_memory")
4943 (match_operand:V4SI 1 "s_register_operand")
4944 (match_operand:V4SI 2 "s_register_operand")
4945 (match_operand:V4BI 3 "vpr_register_operand")
4946 (unspec:V4SI [(const_int 0)] VSTRWSSOQ)]
4949 rtx ind = XEXP (operands[0], 0);
4950 gcc_assert (REG_P (ind));
4952 gen_mve_vstrwq_scatter_shifted_offset_p_<supf>v4si_insn (ind, operands[1],
4958 (define_insn "mve_vstrwq_scatter_shifted_offset_p_<supf>v4si_insn"
4959 [(set (mem:BLK (scratch))
4961 [(match_operand:SI 0 "register_operand" "r")
4962 (match_operand:V4SI 1 "s_register_operand" "w")
4963 (match_operand:V4SI 2 "s_register_operand" "w")
4964 (match_operand:V4BI 3 "vpr_register_operand" "Up")]
4967 "vpst\;vstrwt.32\t%q2, [%0, %q1, uxtw #2]"
4968 [(set_attr "length" "8")])
4971 ;; [vstrwq_scatter_shifted_offset_s vstrwq_scatter_shifted_offset_u]
4973 (define_expand "mve_vstrwq_scatter_shifted_offset_<supf>v4si"
4974 [(match_operand:V4SI 0 "mve_scatter_memory")
4975 (match_operand:V4SI 1 "s_register_operand")
4976 (match_operand:V4SI 2 "s_register_operand")
4977 (unspec:V4SI [(const_int 0)] VSTRWSSOQ)]
4980 rtx ind = XEXP (operands[0], 0);
4981 gcc_assert (REG_P (ind));
4983 gen_mve_vstrwq_scatter_shifted_offset_<supf>v4si_insn (ind, operands[1],
4988 (define_insn "mve_vstrwq_scatter_shifted_offset_<supf>v4si_insn"
4989 [(set (mem:BLK (scratch))
4991 [(match_operand:SI 0 "register_operand" "r")
4992 (match_operand:V4SI 1 "s_register_operand" "w")
4993 (match_operand:V4SI 2 "s_register_operand" "w")]
4996 "vstrw.32\t%q2, [%0, %q1, uxtw #2]"
4997 [(set_attr "length" "4")])
5002 (define_expand "mve_vidupq_n_u<mode>"
5003 [(match_operand:MVE_2 0 "s_register_operand")
5004 (match_operand:SI 1 "s_register_operand")
5005 (match_operand:SI 2 "mve_imm_selective_upto_8")]
5008 rtx temp = gen_reg_rtx (SImode);
5009 emit_move_insn (temp, operands[1]);
5010 rtx inc = gen_int_mode (INTVAL(operands[2]) * <MVE_LANES>, SImode);
5011 emit_insn (gen_mve_vidupq_u<mode>_insn (operands[0], temp, operands[1],
5019 (define_insn "mve_vidupq_u<mode>_insn"
5020 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
5021 (unspec:MVE_2 [(match_operand:SI 2 "s_register_operand" "1")
5022 (match_operand:SI 3 "mve_imm_selective_upto_8" "Rg")]
5024 (set (match_operand:SI 1 "s_register_operand" "=Te")
5025 (plus:SI (match_dup 2)
5026 (match_operand:SI 4 "immediate_operand" "i")))]
5028 "vidup.u%#<V_sz_elem>\t%q0, %1, %3")
5033 (define_expand "mve_vidupq_m_n_u<mode>"
5034 [(match_operand:MVE_2 0 "s_register_operand")
5035 (match_operand:MVE_2 1 "s_register_operand")
5036 (match_operand:SI 2 "s_register_operand")
5037 (match_operand:SI 3 "mve_imm_selective_upto_8")
5038 (match_operand:<MVE_VPRED> 4 "vpr_register_operand")]
5041 rtx temp = gen_reg_rtx (SImode);
5042 emit_move_insn (temp, operands[2]);
5043 rtx inc = gen_int_mode (INTVAL(operands[3]) * <MVE_LANES>, SImode);
5044 emit_insn (gen_mve_vidupq_m_wb_u<mode>_insn(operands[0], operands[1], temp,
5045 operands[2], operands[3],
5051 ;; [vidupq_m_wb_u_insn])
5053 (define_insn "mve_vidupq_m_wb_u<mode>_insn"
5054 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
5055 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5056 (match_operand:SI 3 "s_register_operand" "2")
5057 (match_operand:SI 4 "mve_imm_selective_upto_8" "Rg")
5058 (match_operand:<MVE_VPRED> 5 "vpr_register_operand" "Up")]
5060 (set (match_operand:SI 2 "s_register_operand" "=Te")
5061 (plus:SI (match_dup 3)
5062 (match_operand:SI 6 "immediate_operand" "i")))]
5064 "vpst\;\tvidupt.u%#<V_sz_elem>\t%q0, %2, %4"
5065 [(set_attr "length""8")])
5070 (define_expand "mve_vddupq_n_u<mode>"
5071 [(match_operand:MVE_2 0 "s_register_operand")
5072 (match_operand:SI 1 "s_register_operand")
5073 (match_operand:SI 2 "mve_imm_selective_upto_8")]
5076 rtx temp = gen_reg_rtx (SImode);
5077 emit_move_insn (temp, operands[1]);
5078 rtx inc = gen_int_mode (INTVAL(operands[2]) * <MVE_LANES>, SImode);
5079 emit_insn (gen_mve_vddupq_u<mode>_insn (operands[0], temp, operands[1],
5087 (define_insn "mve_vddupq_u<mode>_insn"
5088 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
5089 (unspec:MVE_2 [(match_operand:SI 2 "s_register_operand" "1")
5090 (match_operand:SI 3 "immediate_operand" "i")]
5092 (set (match_operand:SI 1 "s_register_operand" "=Te")
5093 (minus:SI (match_dup 2)
5094 (match_operand:SI 4 "immediate_operand" "i")))]
5096 "vddup.u%#<V_sz_elem>\t%q0, %1, %3")
5101 (define_expand "mve_vddupq_m_n_u<mode>"
5102 [(match_operand:MVE_2 0 "s_register_operand")
5103 (match_operand:MVE_2 1 "s_register_operand")
5104 (match_operand:SI 2 "s_register_operand")
5105 (match_operand:SI 3 "mve_imm_selective_upto_8")
5106 (match_operand:<MVE_VPRED> 4 "vpr_register_operand")]
5109 rtx temp = gen_reg_rtx (SImode);
5110 emit_move_insn (temp, operands[2]);
5111 rtx inc = gen_int_mode (INTVAL(operands[3]) * <MVE_LANES>, SImode);
5112 emit_insn (gen_mve_vddupq_m_wb_u<mode>_insn(operands[0], operands[1], temp,
5113 operands[2], operands[3],
5119 ;; [vddupq_m_wb_u_insn])
5121 (define_insn "mve_vddupq_m_wb_u<mode>_insn"
5122 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
5123 (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
5124 (match_operand:SI 3 "s_register_operand" "2")
5125 (match_operand:SI 4 "mve_imm_selective_upto_8" "Rg")
5126 (match_operand:<MVE_VPRED> 5 "vpr_register_operand" "Up")]
5128 (set (match_operand:SI 2 "s_register_operand" "=Te")
5129 (minus:SI (match_dup 3)
5130 (match_operand:SI 6 "immediate_operand" "i")))]
5132 "vpst\;vddupt.u%#<V_sz_elem>\t%q0, %2, %4"
5133 [(set_attr "length""8")])
5138 (define_expand "mve_vdwdupq_n_u<mode>"
5139 [(match_operand:MVE_2 0 "s_register_operand")
5140 (match_operand:SI 1 "s_register_operand")
5141 (match_operand:DI 2 "s_register_operand")
5142 (match_operand:SI 3 "mve_imm_selective_upto_8")]
5145 rtx ignore_wb = gen_reg_rtx (SImode);
5146 emit_insn (gen_mve_vdwdupq_wb_u<mode>_insn (operands[0], ignore_wb,
5147 operands[1], operands[2],
5155 (define_expand "mve_vdwdupq_wb_u<mode>"
5156 [(match_operand:SI 0 "s_register_operand")
5157 (match_operand:SI 1 "s_register_operand")
5158 (match_operand:DI 2 "s_register_operand")
5159 (match_operand:SI 3 "mve_imm_selective_upto_8")
5160 (unspec:MVE_2 [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
5163 rtx ignore_vec = gen_reg_rtx (<MODE>mode);
5164 emit_insn (gen_mve_vdwdupq_wb_u<mode>_insn (ignore_vec, operands[0],
5165 operands[1], operands[2],
5171 ;; [vdwdupq_wb_u_insn])
5173 (define_insn "mve_vdwdupq_wb_u<mode>_insn"
5174 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
5175 (unspec:MVE_2 [(match_operand:SI 2 "s_register_operand" "1")
5176 (subreg:SI (match_operand:DI 3 "s_register_operand" "r") 4)
5177 (match_operand:SI 4 "mve_imm_selective_upto_8" "Rg")]
5179 (set (match_operand:SI 1 "s_register_operand" "=Te")
5180 (unspec:SI [(match_dup 2)
5181 (subreg:SI (match_dup 3) 4)
5185 "vdwdup.u%#<V_sz_elem>\t%q0, %2, %R3, %4"
5191 (define_expand "mve_vdwdupq_m_n_u<mode>"
5192 [(match_operand:MVE_2 0 "s_register_operand")
5193 (match_operand:MVE_2 1 "s_register_operand")
5194 (match_operand:SI 2 "s_register_operand")
5195 (match_operand:DI 3 "s_register_operand")
5196 (match_operand:SI 4 "mve_imm_selective_upto_8")
5197 (match_operand:<MVE_VPRED> 5 "vpr_register_operand")]
5200 rtx ignore_wb = gen_reg_rtx (SImode);
5201 emit_insn (gen_mve_vdwdupq_m_wb_u<mode>_insn (operands[0], ignore_wb,
5202 operands[1], operands[2],
5203 operands[3], operands[4],
5209 ;; [vdwdupq_m_wb_u])
5211 (define_expand "mve_vdwdupq_m_wb_u<mode>"
5212 [(match_operand:SI 0 "s_register_operand")
5213 (match_operand:MVE_2 1 "s_register_operand")
5214 (match_operand:SI 2 "s_register_operand")
5215 (match_operand:DI 3 "s_register_operand")
5216 (match_operand:SI 4 "mve_imm_selective_upto_8")
5217 (match_operand:<MVE_VPRED> 5 "vpr_register_operand")]
5220 rtx ignore_vec = gen_reg_rtx (<MODE>mode);
5221 emit_insn (gen_mve_vdwdupq_m_wb_u<mode>_insn (ignore_vec, operands[0],
5222 operands[1], operands[2],
5223 operands[3], operands[4],
5229 ;; [vdwdupq_m_wb_u_insn])
5231 (define_insn "mve_vdwdupq_m_wb_u<mode>_insn"
5232 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
5233 (unspec:MVE_2 [(match_operand:MVE_2 2 "s_register_operand" "0")
5234 (match_operand:SI 3 "s_register_operand" "1")
5235 (subreg:SI (match_operand:DI 4 "s_register_operand" "r") 4)
5236 (match_operand:SI 5 "mve_imm_selective_upto_8" "Rg")
5237 (match_operand:<MVE_VPRED> 6 "vpr_register_operand" "Up")]
5239 (set (match_operand:SI 1 "s_register_operand" "=Te")
5240 (unspec:SI [(match_dup 2)
5242 (subreg:SI (match_dup 4) 4)
5248 "vpst\;vdwdupt.u%#<V_sz_elem>\t%q2, %3, %R4, %5"
5249 [(set_attr "type" "mve_move")
5250 (set_attr "length""8")])
5255 (define_expand "mve_viwdupq_n_u<mode>"
5256 [(match_operand:MVE_2 0 "s_register_operand")
5257 (match_operand:SI 1 "s_register_operand")
5258 (match_operand:DI 2 "s_register_operand")
5259 (match_operand:SI 3 "mve_imm_selective_upto_8")]
5262 rtx ignore_wb = gen_reg_rtx (SImode);
5263 emit_insn (gen_mve_viwdupq_wb_u<mode>_insn (operands[0], ignore_wb,
5264 operands[1], operands[2],
5272 (define_expand "mve_viwdupq_wb_u<mode>"
5273 [(match_operand:SI 0 "s_register_operand")
5274 (match_operand:SI 1 "s_register_operand")
5275 (match_operand:DI 2 "s_register_operand")
5276 (match_operand:SI 3 "mve_imm_selective_upto_8")
5277 (unspec:MVE_2 [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
5280 rtx ignore_vec = gen_reg_rtx (<MODE>mode);
5281 emit_insn (gen_mve_viwdupq_wb_u<mode>_insn (ignore_vec, operands[0],
5282 operands[1], operands[2],
5288 ;; [viwdupq_wb_u_insn])
5290 (define_insn "mve_viwdupq_wb_u<mode>_insn"
5291 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
5292 (unspec:MVE_2 [(match_operand:SI 2 "s_register_operand" "1")
5293 (subreg:SI (match_operand:DI 3 "s_register_operand" "r") 4)
5294 (match_operand:SI 4 "mve_imm_selective_upto_8" "Rg")]
5296 (set (match_operand:SI 1 "s_register_operand" "=Te")
5297 (unspec:SI [(match_dup 2)
5298 (subreg:SI (match_dup 3) 4)
5302 "viwdup.u%#<V_sz_elem>\t%q0, %2, %R3, %4"
5308 (define_expand "mve_viwdupq_m_n_u<mode>"
5309 [(match_operand:MVE_2 0 "s_register_operand")
5310 (match_operand:MVE_2 1 "s_register_operand")
5311 (match_operand:SI 2 "s_register_operand")
5312 (match_operand:DI 3 "s_register_operand")
5313 (match_operand:SI 4 "mve_imm_selective_upto_8")
5314 (match_operand:<MVE_VPRED> 5 "vpr_register_operand")]
5317 rtx ignore_wb = gen_reg_rtx (SImode);
5318 emit_insn (gen_mve_viwdupq_m_wb_u<mode>_insn (operands[0], ignore_wb,
5319 operands[1], operands[2],
5320 operands[3], operands[4],
5326 ;; [viwdupq_m_wb_u])
5328 (define_expand "mve_viwdupq_m_wb_u<mode>"
5329 [(match_operand:SI 0 "s_register_operand")
5330 (match_operand:MVE_2 1 "s_register_operand")
5331 (match_operand:SI 2 "s_register_operand")
5332 (match_operand:DI 3 "s_register_operand")
5333 (match_operand:SI 4 "mve_imm_selective_upto_8")
5334 (match_operand:<MVE_VPRED> 5 "vpr_register_operand")]
5337 rtx ignore_vec = gen_reg_rtx (<MODE>mode);
5338 emit_insn (gen_mve_viwdupq_m_wb_u<mode>_insn (ignore_vec, operands[0],
5339 operands[1], operands[2],
5340 operands[3], operands[4],
5346 ;; [viwdupq_m_wb_u_insn])
5348 (define_insn "mve_viwdupq_m_wb_u<mode>_insn"
5349 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
5350 (unspec:MVE_2 [(match_operand:MVE_2 2 "s_register_operand" "0")
5351 (match_operand:SI 3 "s_register_operand" "1")
5352 (subreg:SI (match_operand:DI 4 "s_register_operand" "r") 4)
5353 (match_operand:SI 5 "mve_imm_selective_upto_8" "Rg")
5354 (match_operand:<MVE_VPRED> 6 "vpr_register_operand" "Up")]
5356 (set (match_operand:SI 1 "s_register_operand" "=Te")
5357 (unspec:SI [(match_dup 2)
5359 (subreg:SI (match_dup 4) 4)
5365 "vpst\;\tviwdupt.u%#<V_sz_elem>\t%q2, %3, %R4, %5"
5366 [(set_attr "type" "mve_move")
5367 (set_attr "length""8")])
5370 ;; [vstrwq_scatter_base_wb_s vstrwq_scatter_base_wb_u]
5372 (define_insn "mve_vstrwq_scatter_base_wb_<supf>v4si"
5373 [(set (mem:BLK (scratch))
5375 [(match_operand:V4SI 1 "s_register_operand" "0")
5376 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
5377 (match_operand:V4SI 3 "s_register_operand" "w")]
5379 (set (match_operand:V4SI 0 "s_register_operand" "=w")
5380 (unspec:V4SI [(match_dup 1) (match_dup 2)]
5386 ops[0] = operands[1];
5387 ops[1] = operands[2];
5388 ops[2] = operands[3];
5389 output_asm_insn ("vstrw.u32\t%q2, [%q0, %1]!",ops);
5392 [(set_attr "length" "4")])
5395 ;; [vstrwq_scatter_base_wb_p_s vstrwq_scatter_base_wb_p_u]
5397 (define_insn "mve_vstrwq_scatter_base_wb_p_<supf>v4si"
5398 [(set (mem:BLK (scratch))
5400 [(match_operand:V4SI 1 "s_register_operand" "0")
5401 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
5402 (match_operand:V4SI 3 "s_register_operand" "w")
5403 (match_operand:V4BI 4 "vpr_register_operand" "Up")]
5405 (set (match_operand:V4SI 0 "s_register_operand" "=w")
5406 (unspec:V4SI [(match_dup 1) (match_dup 2)]
5412 ops[0] = operands[1];
5413 ops[1] = operands[2];
5414 ops[2] = operands[3];
5415 output_asm_insn ("vpst\;\tvstrwt.u32\t%q2, [%q0, %1]!",ops);
5418 [(set_attr "length" "8")])
5421 ;; [vstrwq_scatter_base_wb_f]
5423 (define_insn "mve_vstrwq_scatter_base_wb_fv4sf"
5424 [(set (mem:BLK (scratch))
5426 [(match_operand:V4SI 1 "s_register_operand" "0")
5427 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
5428 (match_operand:V4SF 3 "s_register_operand" "w")]
5430 (set (match_operand:V4SI 0 "s_register_operand" "=w")
5431 (unspec:V4SI [(match_dup 1) (match_dup 2)]
5434 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5437 ops[0] = operands[1];
5438 ops[1] = operands[2];
5439 ops[2] = operands[3];
5440 output_asm_insn ("vstrw.u32\t%q2, [%q0, %1]!",ops);
5443 [(set_attr "length" "4")])
5446 ;; [vstrwq_scatter_base_wb_p_f]
5448 (define_insn "mve_vstrwq_scatter_base_wb_p_fv4sf"
5449 [(set (mem:BLK (scratch))
5451 [(match_operand:V4SI 1 "s_register_operand" "0")
5452 (match_operand:SI 2 "mve_vstrw_immediate" "Rl")
5453 (match_operand:V4SF 3 "s_register_operand" "w")
5454 (match_operand:V4BI 4 "vpr_register_operand" "Up")]
5456 (set (match_operand:V4SI 0 "s_register_operand" "=w")
5457 (unspec:V4SI [(match_dup 1) (match_dup 2)]
5460 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5463 ops[0] = operands[1];
5464 ops[1] = operands[2];
5465 ops[2] = operands[3];
5466 output_asm_insn ("vpst\;vstrwt.u32\t%q2, [%q0, %1]!",ops);
5469 [(set_attr "length" "8")])
5472 ;; [vstrdq_scatter_base_wb_s vstrdq_scatter_base_wb_u]
5474 (define_insn "mve_vstrdq_scatter_base_wb_<supf>v2di"
5475 [(set (mem:BLK (scratch))
5477 [(match_operand:V2DI 1 "s_register_operand" "0")
5478 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
5479 (match_operand:V2DI 3 "s_register_operand" "w")]
5481 (set (match_operand:V2DI 0 "s_register_operand" "=&w")
5482 (unspec:V2DI [(match_dup 1) (match_dup 2)]
5488 ops[0] = operands[1];
5489 ops[1] = operands[2];
5490 ops[2] = operands[3];
5491 output_asm_insn ("vstrd.u64\t%q2, [%q0, %1]!",ops);
5494 [(set_attr "length" "4")])
5497 ;; [vstrdq_scatter_base_wb_p_s vstrdq_scatter_base_wb_p_u]
5499 (define_insn "mve_vstrdq_scatter_base_wb_p_<supf>v2di"
5500 [(set (mem:BLK (scratch))
5502 [(match_operand:V2DI 1 "s_register_operand" "0")
5503 (match_operand:SI 2 "mve_vldrd_immediate" "Ri")
5504 (match_operand:V2DI 3 "s_register_operand" "w")
5505 (match_operand:V2QI 4 "vpr_register_operand" "Up")]
5507 (set (match_operand:V2DI 0 "s_register_operand" "=w")
5508 (unspec:V2DI [(match_dup 1) (match_dup 2)]
5514 ops[0] = operands[1];
5515 ops[1] = operands[2];
5516 ops[2] = operands[3];
5517 output_asm_insn ("vpst\;vstrdt.u64\t%q2, [%q0, %1]!",ops);
5520 [(set_attr "length" "8")])
5522 (define_expand "mve_vldrwq_gather_base_wb_<supf>v4si"
5523 [(match_operand:V4SI 0 "s_register_operand")
5524 (match_operand:V4SI 1 "s_register_operand")
5525 (match_operand:SI 2 "mve_vldrd_immediate")
5526 (unspec:V4SI [(const_int 0)] VLDRWGBWBQ)]
5529 rtx ignore_result = gen_reg_rtx (V4SImode);
5531 gen_mve_vldrwq_gather_base_wb_<supf>v4si_insn (ignore_result, operands[0],
5532 operands[1], operands[2]));
5536 (define_expand "mve_vldrwq_gather_base_nowb_<supf>v4si"
5537 [(match_operand:V4SI 0 "s_register_operand")
5538 (match_operand:V4SI 1 "s_register_operand")
5539 (match_operand:SI 2 "mve_vldrd_immediate")
5540 (unspec:V4SI [(const_int 0)] VLDRWGBWBQ)]
5543 rtx ignore_wb = gen_reg_rtx (V4SImode);
5545 gen_mve_vldrwq_gather_base_wb_<supf>v4si_insn (operands[0], ignore_wb,
5546 operands[1], operands[2]));
5551 ;; [vldrwq_gather_base_wb_s vldrwq_gather_base_wb_u]
5553 (define_insn "mve_vldrwq_gather_base_wb_<supf>v4si_insn"
5554 [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
5555 (unspec:V4SI [(match_operand:V4SI 2 "s_register_operand" "1")
5556 (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
5557 (mem:BLK (scratch))]
5559 (set (match_operand:V4SI 1 "s_register_operand" "=&w")
5560 (unspec:V4SI [(match_dup 2) (match_dup 3)]
5566 ops[0] = operands[0];
5567 ops[1] = operands[2];
5568 ops[2] = operands[3];
5569 output_asm_insn ("vldrw.u32\t%q0, [%q1, %2]!",ops);
5572 [(set_attr "length" "4")])
5574 (define_expand "mve_vldrwq_gather_base_wb_z_<supf>v4si"
5575 [(match_operand:V4SI 0 "s_register_operand")
5576 (match_operand:V4SI 1 "s_register_operand")
5577 (match_operand:SI 2 "mve_vldrd_immediate")
5578 (match_operand:V4BI 3 "vpr_register_operand")
5579 (unspec:V4SI [(const_int 0)] VLDRWGBWBQ)]
5582 rtx ignore_result = gen_reg_rtx (V4SImode);
5584 gen_mve_vldrwq_gather_base_wb_z_<supf>v4si_insn (ignore_result, operands[0],
5585 operands[1], operands[2],
5589 (define_expand "mve_vldrwq_gather_base_nowb_z_<supf>v4si"
5590 [(match_operand:V4SI 0 "s_register_operand")
5591 (match_operand:V4SI 1 "s_register_operand")
5592 (match_operand:SI 2 "mve_vldrd_immediate")
5593 (match_operand:V4BI 3 "vpr_register_operand")
5594 (unspec:V4SI [(const_int 0)] VLDRWGBWBQ)]
5597 rtx ignore_wb = gen_reg_rtx (V4SImode);
5599 gen_mve_vldrwq_gather_base_wb_z_<supf>v4si_insn (operands[0], ignore_wb,
5600 operands[1], operands[2],
5606 ;; [vldrwq_gather_base_wb_z_s vldrwq_gather_base_wb_z_u]
5608 (define_insn "mve_vldrwq_gather_base_wb_z_<supf>v4si_insn"
5609 [(set (match_operand:V4SI 0 "s_register_operand" "=&w")
5610 (unspec:V4SI [(match_operand:V4SI 2 "s_register_operand" "1")
5611 (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
5612 (match_operand:V4BI 4 "vpr_register_operand" "Up")
5613 (mem:BLK (scratch))]
5615 (set (match_operand:V4SI 1 "s_register_operand" "=&w")
5616 (unspec:V4SI [(match_dup 2) (match_dup 3)]
5622 ops[0] = operands[0];
5623 ops[1] = operands[2];
5624 ops[2] = operands[3];
5625 output_asm_insn ("vpst\;vldrwt.u32\t%q0, [%q1, %2]!",ops);
5628 [(set_attr "length" "8")])
5630 (define_expand "mve_vldrwq_gather_base_wb_fv4sf"
5631 [(match_operand:V4SI 0 "s_register_operand")
5632 (match_operand:V4SI 1 "s_register_operand")
5633 (match_operand:SI 2 "mve_vldrd_immediate")
5634 (unspec:V4SI [(const_int 0)] VLDRWQGBWB_F)]
5635 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5637 rtx ignore_result = gen_reg_rtx (V4SFmode);
5639 gen_mve_vldrwq_gather_base_wb_fv4sf_insn (ignore_result, operands[0],
5640 operands[1], operands[2]));
5644 (define_expand "mve_vldrwq_gather_base_nowb_fv4sf"
5645 [(match_operand:V4SF 0 "s_register_operand")
5646 (match_operand:V4SI 1 "s_register_operand")
5647 (match_operand:SI 2 "mve_vldrd_immediate")
5648 (unspec:V4SI [(const_int 0)] VLDRWQGBWB_F)]
5649 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5651 rtx ignore_wb = gen_reg_rtx (V4SImode);
5653 gen_mve_vldrwq_gather_base_wb_fv4sf_insn (operands[0], ignore_wb,
5654 operands[1], operands[2]));
5659 ;; [vldrwq_gather_base_wb_f]
5661 (define_insn "mve_vldrwq_gather_base_wb_fv4sf_insn"
5662 [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
5663 (unspec:V4SF [(match_operand:V4SI 2 "s_register_operand" "1")
5664 (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
5665 (mem:BLK (scratch))]
5667 (set (match_operand:V4SI 1 "s_register_operand" "=&w")
5668 (unspec:V4SI [(match_dup 2) (match_dup 3)]
5671 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5674 ops[0] = operands[0];
5675 ops[1] = operands[2];
5676 ops[2] = operands[3];
5677 output_asm_insn ("vldrw.u32\t%q0, [%q1, %2]!",ops);
5680 [(set_attr "length" "4")])
5682 (define_expand "mve_vldrwq_gather_base_wb_z_fv4sf"
5683 [(match_operand:V4SI 0 "s_register_operand")
5684 (match_operand:V4SI 1 "s_register_operand")
5685 (match_operand:SI 2 "mve_vldrd_immediate")
5686 (match_operand:V4BI 3 "vpr_register_operand")
5687 (unspec:V4SI [(const_int 0)] VLDRWQGBWB_F)]
5688 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5690 rtx ignore_result = gen_reg_rtx (V4SFmode);
5692 gen_mve_vldrwq_gather_base_wb_z_fv4sf_insn (ignore_result, operands[0],
5693 operands[1], operands[2],
5698 (define_expand "mve_vldrwq_gather_base_nowb_z_fv4sf"
5699 [(match_operand:V4SF 0 "s_register_operand")
5700 (match_operand:V4SI 1 "s_register_operand")
5701 (match_operand:SI 2 "mve_vldrd_immediate")
5702 (match_operand:V4BI 3 "vpr_register_operand")
5703 (unspec:V4SI [(const_int 0)] VLDRWQGBWB_F)]
5704 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5706 rtx ignore_wb = gen_reg_rtx (V4SImode);
5708 gen_mve_vldrwq_gather_base_wb_z_fv4sf_insn (operands[0], ignore_wb,
5709 operands[1], operands[2],
5715 ;; [vldrwq_gather_base_wb_z_f]
5717 (define_insn "mve_vldrwq_gather_base_wb_z_fv4sf_insn"
5718 [(set (match_operand:V4SF 0 "s_register_operand" "=&w")
5719 (unspec:V4SF [(match_operand:V4SI 2 "s_register_operand" "1")
5720 (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
5721 (match_operand:V4BI 4 "vpr_register_operand" "Up")
5722 (mem:BLK (scratch))]
5724 (set (match_operand:V4SI 1 "s_register_operand" "=&w")
5725 (unspec:V4SI [(match_dup 2) (match_dup 3)]
5728 "TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT"
5731 ops[0] = operands[0];
5732 ops[1] = operands[2];
5733 ops[2] = operands[3];
5734 output_asm_insn ("vpst\;vldrwt.u32\t%q0, [%q1, %2]!",ops);
5737 [(set_attr "length" "8")])
5739 (define_expand "mve_vldrdq_gather_base_wb_<supf>v2di"
5740 [(match_operand:V2DI 0 "s_register_operand")
5741 (match_operand:V2DI 1 "s_register_operand")
5742 (match_operand:SI 2 "mve_vldrd_immediate")
5743 (unspec:V2DI [(const_int 0)] VLDRDGBWBQ)]
5746 rtx ignore_result = gen_reg_rtx (V2DImode);
5748 gen_mve_vldrdq_gather_base_wb_<supf>v2di_insn (ignore_result, operands[0],
5749 operands[1], operands[2]));
5753 (define_expand "mve_vldrdq_gather_base_nowb_<supf>v2di"
5754 [(match_operand:V2DI 0 "s_register_operand")
5755 (match_operand:V2DI 1 "s_register_operand")
5756 (match_operand:SI 2 "mve_vldrd_immediate")
5757 (unspec:V2DI [(const_int 0)] VLDRDGBWBQ)]
5760 rtx ignore_wb = gen_reg_rtx (V2DImode);
5762 gen_mve_vldrdq_gather_base_wb_<supf>v2di_insn (operands[0], ignore_wb,
5763 operands[1], operands[2]));
5769 ;; [vldrdq_gather_base_wb_s vldrdq_gather_base_wb_u]
5771 (define_insn "mve_vldrdq_gather_base_wb_<supf>v2di_insn"
5772 [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
5773 (unspec:V2DI [(match_operand:V2DI 2 "s_register_operand" "1")
5774 (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
5775 (mem:BLK (scratch))]
5777 (set (match_operand:V2DI 1 "s_register_operand" "=&w")
5778 (unspec:V2DI [(match_dup 2) (match_dup 3)]
5784 ops[0] = operands[0];
5785 ops[1] = operands[2];
5786 ops[2] = operands[3];
5787 output_asm_insn ("vldrd.64\t%q0, [%q1, %2]!",ops);
5790 [(set_attr "length" "4")])
5792 (define_expand "mve_vldrdq_gather_base_wb_z_<supf>v2di"
5793 [(match_operand:V2DI 0 "s_register_operand")
5794 (match_operand:V2DI 1 "s_register_operand")
5795 (match_operand:SI 2 "mve_vldrd_immediate")
5796 (match_operand:V2QI 3 "vpr_register_operand")
5797 (unspec:V2DI [(const_int 0)] VLDRDGBWBQ)]
5800 rtx ignore_result = gen_reg_rtx (V2DImode);
5802 gen_mve_vldrdq_gather_base_wb_z_<supf>v2di_insn (ignore_result, operands[0],
5803 operands[1], operands[2],
5808 (define_expand "mve_vldrdq_gather_base_nowb_z_<supf>v2di"
5809 [(match_operand:V2DI 0 "s_register_operand")
5810 (match_operand:V2DI 1 "s_register_operand")
5811 (match_operand:SI 2 "mve_vldrd_immediate")
5812 (match_operand:V2QI 3 "vpr_register_operand")
5813 (unspec:V2DI [(const_int 0)] VLDRDGBWBQ)]
5816 rtx ignore_wb = gen_reg_rtx (V2DImode);
5818 gen_mve_vldrdq_gather_base_wb_z_<supf>v2di_insn (operands[0], ignore_wb,
5819 operands[1], operands[2],
5824 (define_insn "get_fpscr_nzcvqc"
5825 [(set (match_operand:SI 0 "register_operand" "=r")
5826 (unspec_volatile:SI [(reg:SI VFPCC_REGNUM)] UNSPEC_GET_FPSCR_NZCVQC))]
5828 "vmrs\\t%0, FPSCR_nzcvqc"
5829 [(set_attr "type" "mve_move")])
5831 (define_insn "set_fpscr_nzcvqc"
5832 [(set (reg:SI VFPCC_REGNUM)
5833 (unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")]
5834 VUNSPEC_SET_FPSCR_NZCVQC))]
5836 "vmsr\\tFPSCR_nzcvqc, %0"
5837 [(set_attr "type" "mve_move")])
5840 ;; [vldrdq_gather_base_wb_z_s vldrdq_gather_base_wb_z_u]
5842 (define_insn "mve_vldrdq_gather_base_wb_z_<supf>v2di_insn"
5843 [(set (match_operand:V2DI 0 "s_register_operand" "=&w")
5844 (unspec:V2DI [(match_operand:V2DI 2 "s_register_operand" "1")
5845 (match_operand:SI 3 "mve_vldrd_immediate" "Ri")
5846 (match_operand:V2QI 4 "vpr_register_operand" "Up")
5847 (mem:BLK (scratch))]
5849 (set (match_operand:V2DI 1 "s_register_operand" "=&w")
5850 (unspec:V2DI [(match_dup 2) (match_dup 3)]
5856 ops[0] = operands[0];
5857 ops[1] = operands[2];
5858 ops[2] = operands[3];
5859 output_asm_insn ("vpst\;vldrdt.u64\t%q0, [%q1, %2]!",ops);
5862 [(set_attr "length" "8")])
5864 ;; [vadciq_m_s, vadciq_m_u])
5866 (define_insn "mve_vadciq_m_<supf>v4si"
5867 [(set (match_operand:V4SI 0 "s_register_operand" "=w")
5868 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "0")
5869 (match_operand:V4SI 2 "s_register_operand" "w")
5870 (match_operand:V4SI 3 "s_register_operand" "w")
5871 (match_operand:V4BI 4 "vpr_register_operand" "Up")]
5873 (set (reg:SI VFPCC_REGNUM)
5874 (unspec:SI [(const_int 0)]
5878 "vpst\;vadcit.i32\t%q0, %q2, %q3"
5879 [(set_attr "type" "mve_move")
5880 (set_attr "length" "8")])
5883 ;; [vadciq_u, vadciq_s])
5885 (define_insn "mve_vadciq_<supf>v4si"
5886 [(set (match_operand:V4SI 0 "s_register_operand" "=w")
5887 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
5888 (match_operand:V4SI 2 "s_register_operand" "w")]
5890 (set (reg:SI VFPCC_REGNUM)
5891 (unspec:SI [(const_int 0)]
5895 "vadci.i32\t%q0, %q1, %q2"
5896 [(set_attr "type" "mve_move")
5897 (set_attr "length" "4")])
5900 ;; [vadcq_m_s, vadcq_m_u])
5902 (define_insn "mve_vadcq_m_<supf>v4si"
5903 [(set (match_operand:V4SI 0 "s_register_operand" "=w")
5904 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "0")
5905 (match_operand:V4SI 2 "s_register_operand" "w")
5906 (match_operand:V4SI 3 "s_register_operand" "w")
5907 (match_operand:V4BI 4 "vpr_register_operand" "Up")]
5909 (set (reg:SI VFPCC_REGNUM)
5910 (unspec:SI [(reg:SI VFPCC_REGNUM)]
5914 "vpst\;vadct.i32\t%q0, %q2, %q3"
5915 [(set_attr "type" "mve_move")
5916 (set_attr "length" "8")])
5919 ;; [vadcq_u, vadcq_s])
5921 (define_insn "mve_vadcq_<supf>v4si"
5922 [(set (match_operand:V4SI 0 "s_register_operand" "=w")
5923 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
5924 (match_operand:V4SI 2 "s_register_operand" "w")]
5926 (set (reg:SI VFPCC_REGNUM)
5927 (unspec:SI [(reg:SI VFPCC_REGNUM)]
5931 "vadc.i32\t%q0, %q1, %q2"
5932 [(set_attr "type" "mve_move")
5933 (set_attr "length" "4")
5934 (set_attr "conds" "set")])
5937 ;; [vsbciq_m_u, vsbciq_m_s])
5939 (define_insn "mve_vsbciq_m_<supf>v4si"
5940 [(set (match_operand:V4SI 0 "s_register_operand" "=w")
5941 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
5942 (match_operand:V4SI 2 "s_register_operand" "w")
5943 (match_operand:V4SI 3 "s_register_operand" "w")
5944 (match_operand:V4BI 4 "vpr_register_operand" "Up")]
5946 (set (reg:SI VFPCC_REGNUM)
5947 (unspec:SI [(const_int 0)]
5951 "vpst\;vsbcit.i32\t%q0, %q2, %q3"
5952 [(set_attr "type" "mve_move")
5953 (set_attr "length" "8")])
5956 ;; [vsbciq_s, vsbciq_u])
5958 (define_insn "mve_vsbciq_<supf>v4si"
5959 [(set (match_operand:V4SI 0 "s_register_operand" "=w")
5960 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
5961 (match_operand:V4SI 2 "s_register_operand" "w")]
5963 (set (reg:SI VFPCC_REGNUM)
5964 (unspec:SI [(const_int 0)]
5968 "vsbci.i32\t%q0, %q1, %q2"
5969 [(set_attr "type" "mve_move")
5970 (set_attr "length" "4")])
5973 ;; [vsbcq_m_u, vsbcq_m_s])
5975 (define_insn "mve_vsbcq_m_<supf>v4si"
5976 [(set (match_operand:V4SI 0 "s_register_operand" "=w")
5977 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
5978 (match_operand:V4SI 2 "s_register_operand" "w")
5979 (match_operand:V4SI 3 "s_register_operand" "w")
5980 (match_operand:V4BI 4 "vpr_register_operand" "Up")]
5982 (set (reg:SI VFPCC_REGNUM)
5983 (unspec:SI [(reg:SI VFPCC_REGNUM)]
5987 "vpst\;vsbct.i32\t%q0, %q2, %q3"
5988 [(set_attr "type" "mve_move")
5989 (set_attr "length" "8")])
5992 ;; [vsbcq_s, vsbcq_u])
5994 (define_insn "mve_vsbcq_<supf>v4si"
5995 [(set (match_operand:V4SI 0 "s_register_operand" "=w")
5996 (unspec:V4SI [(match_operand:V4SI 1 "s_register_operand" "w")
5997 (match_operand:V4SI 2 "s_register_operand" "w")]
5999 (set (reg:SI VFPCC_REGNUM)
6000 (unspec:SI [(reg:SI VFPCC_REGNUM)]
6004 "vsbc.i32\t%q0, %q1, %q2"
6005 [(set_attr "type" "mve_move")
6006 (set_attr "length" "4")])
6011 (define_insn "mve_vst2q<mode>"
6012 [(set (match_operand:OI 0 "mve_struct_operand" "=Ug")
6013 (unspec:OI [(match_operand:OI 1 "s_register_operand" "w")
6014 (unspec:MVE_VLD_ST [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
6017 "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
6018 || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
6021 int regno = REGNO (operands[1]);
6022 ops[0] = gen_rtx_REG (TImode, regno);
6023 ops[1] = gen_rtx_REG (TImode, regno + 4);
6024 rtx reg = operands[0];
6025 while (reg && !REG_P (reg))
6026 reg = XEXP (reg, 0);
6027 gcc_assert (REG_P (reg));
6029 ops[3] = operands[0];
6030 output_asm_insn ("vst20.<V_sz_elem>\t{%q0, %q1}, [%2]\n\t"
6031 "vst21.<V_sz_elem>\t{%q0, %q1}, %3", ops);
6034 [(set_attr "length" "8")])
6039 (define_insn "mve_vld2q<mode>"
6040 [(set (match_operand:OI 0 "s_register_operand" "=w")
6041 (unspec:OI [(match_operand:OI 1 "mve_struct_operand" "Ug")
6042 (unspec:MVE_VLD_ST [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
6045 "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
6046 || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
6049 int regno = REGNO (operands[0]);
6050 ops[0] = gen_rtx_REG (TImode, regno);
6051 ops[1] = gen_rtx_REG (TImode, regno + 4);
6052 rtx reg = operands[1];
6053 while (reg && !REG_P (reg))
6054 reg = XEXP (reg, 0);
6055 gcc_assert (REG_P (reg));
6057 ops[3] = operands[1];
6058 output_asm_insn ("vld20.<V_sz_elem>\t{%q0, %q1}, [%2]\n\t"
6059 "vld21.<V_sz_elem>\t{%q0, %q1}, %3", ops);
6062 [(set_attr "length" "8")])
6067 (define_insn "mve_vld4q<mode>"
6068 [(set (match_operand:XI 0 "s_register_operand" "=w")
6069 (unspec:XI [(match_operand:XI 1 "mve_struct_operand" "Ug")
6070 (unspec:MVE_VLD_ST [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
6073 "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
6074 || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
6077 int regno = REGNO (operands[0]);
6078 ops[0] = gen_rtx_REG (TImode, regno);
6079 ops[1] = gen_rtx_REG (TImode, regno+4);
6080 ops[2] = gen_rtx_REG (TImode, regno+8);
6081 ops[3] = gen_rtx_REG (TImode, regno + 12);
6082 rtx reg = operands[1];
6083 while (reg && !REG_P (reg))
6084 reg = XEXP (reg, 0);
6085 gcc_assert (REG_P (reg));
6087 ops[5] = operands[1];
6088 output_asm_insn ("vld40.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
6089 "vld41.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
6090 "vld42.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, [%4]\n\t"
6091 "vld43.<V_sz_elem>\t{%q0, %q1, %q2, %q3}, %5", ops);
6094 [(set_attr "length" "16")])
6096 ;; [vgetq_lane_u, vgetq_lane_s, vgetq_lane_f])
6098 (define_insn "mve_vec_extract<mode><V_elem_l>"
6099 [(set (match_operand:<V_elem> 0 "nonimmediate_operand" "=r")
6100 (vec_select:<V_elem>
6101 (match_operand:MVE_VLD_ST 1 "s_register_operand" "w")
6102 (parallel [(match_operand:SI 2 "immediate_operand" "i")])))]
6103 "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
6104 || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
6106 if (BYTES_BIG_ENDIAN)
6108 int elt = INTVAL (operands[2]);
6109 elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
6110 operands[2] = GEN_INT (elt);
6112 return "vmov.<V_extr_elem>\t%0, %q1[%c2]";
6114 [(set_attr "type" "mve_move")])
6116 (define_insn "mve_vec_extractv2didi"
6117 [(set (match_operand:DI 0 "nonimmediate_operand" "=r")
6119 (match_operand:V2DI 1 "s_register_operand" "w")
6120 (parallel [(match_operand:SI 2 "immediate_operand" "i")])))]
6123 int elt = INTVAL (operands[2]);
6124 if (BYTES_BIG_ENDIAN)
6128 return "vmov\t%Q0, %R0, %e1";
6130 return "vmov\t%Q0, %R0, %f1";
6132 [(set_attr "type" "mve_move")])
6134 (define_insn "*mve_vec_extract_sext_internal<mode>"
6135 [(set (match_operand:SI 0 "s_register_operand" "=r")
6137 (vec_select:<V_elem>
6138 (match_operand:MVE_2 1 "s_register_operand" "w")
6139 (parallel [(match_operand:SI 2 "immediate_operand" "i")]))))]
6140 "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
6141 || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
6143 if (BYTES_BIG_ENDIAN)
6145 int elt = INTVAL (operands[2]);
6146 elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
6147 operands[2] = GEN_INT (elt);
6149 return "vmov.s<V_sz_elem>\t%0, %q1[%c2]";
6151 [(set_attr "type" "mve_move")])
6153 (define_insn "*mve_vec_extract_zext_internal<mode>"
6154 [(set (match_operand:SI 0 "s_register_operand" "=r")
6156 (vec_select:<V_elem>
6157 (match_operand:MVE_2 1 "s_register_operand" "w")
6158 (parallel [(match_operand:SI 2 "immediate_operand" "i")]))))]
6159 "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
6160 || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
6162 if (BYTES_BIG_ENDIAN)
6164 int elt = INTVAL (operands[2]);
6165 elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
6166 operands[2] = GEN_INT (elt);
6168 return "vmov.u<V_sz_elem>\t%0, %q1[%c2]";
6170 [(set_attr "type" "mve_move")])
6173 ;; [vsetq_lane_u, vsetq_lane_s, vsetq_lane_f])
6175 (define_insn "mve_vec_set<mode>_internal"
6176 [(set (match_operand:VQ2 0 "s_register_operand" "=w")
6179 (match_operand:<V_elem> 1 "nonimmediate_operand" "r"))
6180 (match_operand:VQ2 3 "s_register_operand" "0")
6181 (match_operand:SI 2 "immediate_operand" "i")))]
6182 "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
6183 || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
6185 int elt = ffs ((int) INTVAL (operands[2])) - 1;
6186 if (BYTES_BIG_ENDIAN)
6187 elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
6188 operands[2] = GEN_INT (elt);
6190 return "vmov.<V_sz_elem>\t%q0[%c2], %1";
6192 [(set_attr "type" "mve_move")])
6194 (define_insn "mve_vec_setv2di_internal"
6195 [(set (match_operand:V2DI 0 "s_register_operand" "=w")
6198 (match_operand:DI 1 "nonimmediate_operand" "r"))
6199 (match_operand:V2DI 3 "s_register_operand" "0")
6200 (match_operand:SI 2 "immediate_operand" "i")))]
6203 int elt = ffs ((int) INTVAL (operands[2])) - 1;
6204 if (BYTES_BIG_ENDIAN)
6208 return "vmov\t%e0, %Q1, %R1";
6210 return "vmov\t%f0, %J1, %K1";
6212 [(set_attr "type" "mve_move")])
6217 (define_insn "mve_uqrshll_sat<supf>_di"
6218 [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
6219 (unspec:DI [(match_operand:DI 1 "arm_low_register_operand" "0")
6220 (match_operand:SI 2 "register_operand" "r")]
6223 "uqrshll%?\\t%Q1, %R1, #<supf>, %2"
6224 [(set_attr "predicable" "yes")])
6229 (define_insn "mve_sqrshrl_sat<supf>_di"
6230 [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
6231 (unspec:DI [(match_operand:DI 1 "arm_low_register_operand" "0")
6232 (match_operand:SI 2 "register_operand" "r")]
6235 "sqrshrl%?\\t%Q1, %R1, #<supf>, %2"
6236 [(set_attr "predicable" "yes")])
6241 (define_insn "mve_uqrshl_si"
6242 [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
6243 (unspec:SI [(match_operand:SI 1 "arm_general_register_operand" "0")
6244 (match_operand:SI 2 "register_operand" "r")]
6248 [(set_attr "predicable" "yes")])
6253 (define_insn "mve_sqrshr_si"
6254 [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
6255 (unspec:SI [(match_operand:SI 1 "arm_general_register_operand" "0")
6256 (match_operand:SI 2 "register_operand" "r")]
6260 [(set_attr "predicable" "yes")])
6265 (define_insn "mve_uqshll_di"
6266 [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
6267 (us_ashift:DI (match_operand:DI 1 "arm_low_register_operand" "0")
6268 (match_operand:SI 2 "immediate_operand" "Pg")))]
6270 "uqshll%?\\t%Q1, %R1, %2"
6271 [(set_attr "predicable" "yes")])
6276 (define_insn "mve_urshrl_di"
6277 [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
6278 (unspec:DI [(match_operand:DI 1 "arm_low_register_operand" "0")
6279 (match_operand:SI 2 "immediate_operand" "Pg")]
6282 "urshrl%?\\t%Q1, %R1, %2"
6283 [(set_attr "predicable" "yes")])
6288 (define_insn "mve_uqshl_si"
6289 [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
6290 (us_ashift:SI (match_operand:SI 1 "arm_general_register_operand" "0")
6291 (match_operand:SI 2 "immediate_operand" "Pg")))]
6294 [(set_attr "predicable" "yes")])
6299 (define_insn "mve_urshr_si"
6300 [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
6301 (unspec:SI [(match_operand:SI 1 "arm_general_register_operand" "0")
6302 (match_operand:SI 2 "immediate_operand" "Pg")]
6306 [(set_attr "predicable" "yes")])
6311 (define_insn "mve_sqshl_si"
6312 [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
6313 (ss_ashift:SI (match_operand:DI 1 "arm_general_register_operand" "0")
6314 (match_operand:SI 2 "immediate_operand" "Pg")))]
6317 [(set_attr "predicable" "yes")])
6322 (define_insn "mve_srshr_si"
6323 [(set (match_operand:SI 0 "arm_general_register_operand" "=r")
6324 (unspec:SI [(match_operand:DI 1 "arm_general_register_operand" "0")
6325 (match_operand:SI 2 "immediate_operand" "Pg")]
6329 [(set_attr "predicable" "yes")])
6334 (define_insn "mve_srshrl_di"
6335 [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
6336 (unspec:DI [(match_operand:DI 1 "arm_low_register_operand" "0")
6337 (match_operand:SI 2 "immediate_operand" "Pg")]
6340 "srshrl%?\\t%Q1, %R1, %2"
6341 [(set_attr "predicable" "yes")])
6346 (define_insn "mve_sqshll_di"
6347 [(set (match_operand:DI 0 "arm_low_register_operand" "=l")
6348 (ss_ashift:DI (match_operand:DI 1 "arm_low_register_operand" "0")
6349 (match_operand:SI 2 "immediate_operand" "Pg")))]
6351 "sqshll%?\\t%Q1, %R1, %2"
6352 [(set_attr "predicable" "yes")])
6355 ;; [vshlcq_m_u vshlcq_m_s]
6357 (define_expand "mve_vshlcq_m_vec_<supf><mode>"
6358 [(match_operand:MVE_2 0 "s_register_operand")
6359 (match_operand:MVE_2 1 "s_register_operand")
6360 (match_operand:SI 2 "s_register_operand")
6361 (match_operand:SI 3 "mve_imm_32")
6362 (match_operand:<MVE_VPRED> 4 "vpr_register_operand")
6363 (unspec:MVE_2 [(const_int 0)] VSHLCQ_M)]
6366 rtx ignore_wb = gen_reg_rtx (SImode);
6367 emit_insn (gen_mve_vshlcq_m_<supf><mode> (operands[0], ignore_wb, operands[1],
6368 operands[2], operands[3],
6373 (define_expand "mve_vshlcq_m_carry_<supf><mode>"
6374 [(match_operand:SI 0 "s_register_operand")
6375 (match_operand:MVE_2 1 "s_register_operand")
6376 (match_operand:SI 2 "s_register_operand")
6377 (match_operand:SI 3 "mve_imm_32")
6378 (match_operand:<MVE_VPRED> 4 "vpr_register_operand")
6379 (unspec:MVE_2 [(const_int 0)] VSHLCQ_M)]
6382 rtx ignore_vec = gen_reg_rtx (<MODE>mode);
6383 emit_insn (gen_mve_vshlcq_m_<supf><mode> (ignore_vec, operands[0],
6384 operands[1], operands[2],
6385 operands[3], operands[4]));
6389 (define_insn "mve_vshlcq_m_<supf><mode>"
6390 [(set (match_operand:MVE_2 0 "s_register_operand" "=w")
6391 (unspec:MVE_2 [(match_operand:MVE_2 2 "s_register_operand" "0")
6392 (match_operand:SI 3 "s_register_operand" "1")
6393 (match_operand:SI 4 "mve_imm_32" "Rf")
6394 (match_operand:<MVE_VPRED> 5 "vpr_register_operand" "Up")]
6396 (set (match_operand:SI 1 "s_register_operand" "=r")
6397 (unspec:SI [(match_dup 2)
6404 "vpst\;vshlct\t%q0, %1, %4"
6405 [(set_attr "type" "mve_move")
6406 (set_attr "length" "8")])
6408 ;; CDE instructions on MVE registers.
6410 (define_insn "arm_vcx1qv16qi"
6411 [(set (match_operand:V16QI 0 "register_operand" "=t")
6412 (unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
6413 (match_operand:SI 2 "const_int_mve_cde1_operand" "i")]
6415 "TARGET_CDE && TARGET_HAVE_MVE"
6416 "vcx1\\tp%c1, %q0, #%c2"
6417 [(set_attr "type" "coproc")]
6420 (define_insn "arm_vcx1qav16qi"
6421 [(set (match_operand:V16QI 0 "register_operand" "=t")
6422 (unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
6423 (match_operand:V16QI 2 "register_operand" "0")
6424 (match_operand:SI 3 "const_int_mve_cde1_operand" "i")]
6426 "TARGET_CDE && TARGET_HAVE_MVE"
6427 "vcx1a\\tp%c1, %q0, #%c3"
6428 [(set_attr "type" "coproc")]
6431 (define_insn "arm_vcx2qv16qi"
6432 [(set (match_operand:V16QI 0 "register_operand" "=t")
6433 (unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
6434 (match_operand:V16QI 2 "register_operand" "t")
6435 (match_operand:SI 3 "const_int_mve_cde2_operand" "i")]
6437 "TARGET_CDE && TARGET_HAVE_MVE"
6438 "vcx2\\tp%c1, %q0, %q2, #%c3"
6439 [(set_attr "type" "coproc")]
6442 (define_insn "arm_vcx2qav16qi"
6443 [(set (match_operand:V16QI 0 "register_operand" "=t")
6444 (unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
6445 (match_operand:V16QI 2 "register_operand" "0")
6446 (match_operand:V16QI 3 "register_operand" "t")
6447 (match_operand:SI 4 "const_int_mve_cde2_operand" "i")]
6449 "TARGET_CDE && TARGET_HAVE_MVE"
6450 "vcx2a\\tp%c1, %q0, %q3, #%c4"
6451 [(set_attr "type" "coproc")]
6454 (define_insn "arm_vcx3qv16qi"
6455 [(set (match_operand:V16QI 0 "register_operand" "=t")
6456 (unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
6457 (match_operand:V16QI 2 "register_operand" "t")
6458 (match_operand:V16QI 3 "register_operand" "t")
6459 (match_operand:SI 4 "const_int_mve_cde3_operand" "i")]
6461 "TARGET_CDE && TARGET_HAVE_MVE"
6462 "vcx3\\tp%c1, %q0, %q2, %q3, #%c4"
6463 [(set_attr "type" "coproc")]
6466 (define_insn "arm_vcx3qav16qi"
6467 [(set (match_operand:V16QI 0 "register_operand" "=t")
6468 (unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
6469 (match_operand:V16QI 2 "register_operand" "0")
6470 (match_operand:V16QI 3 "register_operand" "t")
6471 (match_operand:V16QI 4 "register_operand" "t")
6472 (match_operand:SI 5 "const_int_mve_cde3_operand" "i")]
6474 "TARGET_CDE && TARGET_HAVE_MVE"
6475 "vcx3a\\tp%c1, %q0, %q3, %q4, #%c5"
6476 [(set_attr "type" "coproc")]
6479 (define_insn "arm_vcx1q<a>_p_v16qi"
6480 [(set (match_operand:V16QI 0 "register_operand" "=t")
6481 (unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
6482 (match_operand:V16QI 2 "register_operand" "0")
6483 (match_operand:SI 3 "const_int_mve_cde1_operand" "i")
6484 (match_operand:V16BI 4 "vpr_register_operand" "Up")]
6486 "TARGET_CDE && TARGET_HAVE_MVE"
6487 "vpst\;vcx1<a>t\\tp%c1, %q0, #%c3"
6488 [(set_attr "type" "coproc")
6489 (set_attr "length" "8")]
6492 (define_insn "arm_vcx2q<a>_p_v16qi"
6493 [(set (match_operand:V16QI 0 "register_operand" "=t")
6494 (unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
6495 (match_operand:V16QI 2 "register_operand" "0")
6496 (match_operand:V16QI 3 "register_operand" "t")
6497 (match_operand:SI 4 "const_int_mve_cde2_operand" "i")
6498 (match_operand:V16BI 5 "vpr_register_operand" "Up")]
6500 "TARGET_CDE && TARGET_HAVE_MVE"
6501 "vpst\;vcx2<a>t\\tp%c1, %q0, %q3, #%c4"
6502 [(set_attr "type" "coproc")
6503 (set_attr "length" "8")]
6506 (define_insn "arm_vcx3q<a>_p_v16qi"
6507 [(set (match_operand:V16QI 0 "register_operand" "=t")
6508 (unspec:V16QI [(match_operand:SI 1 "const_int_coproc_operand" "i")
6509 (match_operand:V16QI 2 "register_operand" "0")
6510 (match_operand:V16QI 3 "register_operand" "t")
6511 (match_operand:V16QI 4 "register_operand" "t")
6512 (match_operand:SI 5 "const_int_mve_cde3_operand" "i")
6513 (match_operand:V16BI 6 "vpr_register_operand" "Up")]
6515 "TARGET_CDE && TARGET_HAVE_MVE"
6516 "vpst\;vcx3<a>t\\tp%c1, %q0, %q3, %q4, #%c5"
6517 [(set_attr "type" "coproc")
6518 (set_attr "length" "8")]
6521 (define_insn "*movmisalign<mode>_mve_store"
6522 [(set (match_operand:MVE_VLD_ST 0 "mve_memory_operand" "=Ux")
6523 (unspec:MVE_VLD_ST [(match_operand:MVE_VLD_ST 1 "s_register_operand" " w")]
6524 UNSPEC_MISALIGNED_ACCESS))]
6525 "((TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
6526 || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode)))
6527 && !BYTES_BIG_ENDIAN && unaligned_access"
6528 "vstr<V_sz_elem1>.<V_sz_elem>\t%q1, %E0"
6529 [(set_attr "type" "mve_store")]
6533 (define_insn "*movmisalign<mode>_mve_load"
6534 [(set (match_operand:MVE_VLD_ST 0 "s_register_operand" "=w")
6535 (unspec:MVE_VLD_ST [(match_operand:MVE_VLD_ST 1 "mve_memory_operand" " Ux")]
6536 UNSPEC_MISALIGNED_ACCESS))]
6537 "((TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
6538 || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode)))
6539 && !BYTES_BIG_ENDIAN && unaligned_access"
6540 "vldr<V_sz_elem1>.<V_sz_elem>\t%q0, %E1"
6541 [(set_attr "type" "mve_load")]
6544 ;; Expander for VxBI moves
6545 (define_expand "mov<mode>"
6546 [(set (match_operand:MVE_7 0 "nonimmediate_operand")
6547 (match_operand:MVE_7 1 "general_operand"))]
6550 if (!register_operand (operands[0], <MODE>mode))
6551 operands[1] = force_reg (<MODE>mode, operands[1]);
6555 ;; Expanders for vec_cmp and vcond
6557 (define_expand "vec_cmp<mode><MVE_vpred>"
6558 [(set (match_operand:<MVE_VPRED> 0 "s_register_operand")
6559 (match_operator:<MVE_VPRED> 1 "comparison_operator"
6560 [(match_operand:MVE_VLD_ST 2 "s_register_operand")
6561 (match_operand:MVE_VLD_ST 3 "reg_or_zero_operand")]))]
6563 && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
6565 arm_expand_vector_compare (operands[0], GET_CODE (operands[1]),
6566 operands[2], operands[3], false);
6570 (define_expand "vec_cmpu<mode><MVE_vpred>"
6571 [(set (match_operand:<MVE_VPRED> 0 "s_register_operand")
6572 (match_operator:<MVE_VPRED> 1 "comparison_operator"
6573 [(match_operand:MVE_2 2 "s_register_operand")
6574 (match_operand:MVE_2 3 "reg_or_zero_operand")]))]
6577 arm_expand_vector_compare (operands[0], GET_CODE (operands[1]),
6578 operands[2], operands[3], false);
6582 (define_expand "vcond_mask_<mode><MVE_vpred>"
6583 [(set (match_operand:MVE_VLD_ST 0 "s_register_operand")
6584 (if_then_else:MVE_VLD_ST
6585 (match_operand:<MVE_VPRED> 3 "s_register_operand")
6586 (match_operand:MVE_VLD_ST 1 "s_register_operand")
6587 (match_operand:MVE_VLD_ST 2 "s_register_operand")))]
6590 switch (GET_MODE_CLASS (<MODE>mode))
6592 case MODE_VECTOR_INT:
6593 emit_insn (gen_mve_q (VPSELQ_S, VPSELQ_S, <MODE>mode, operands[0],
6594 operands[1], operands[2], operands[3]));
6596 case MODE_VECTOR_FLOAT:
6597 emit_insn (gen_mve_q_f (VPSELQ_F, <MODE>mode, operands[0],
6598 operands[1], operands[2], operands[3]));
6606 ;; Reinterpret operand 1 in operand 0's mode, without changing its contents.
6607 (define_expand "@arm_mve_reinterpret<mode>"
6608 [(set (match_operand:MVE_vecs 0 "register_operand")
6610 [(match_operand 1 "arm_any_register_operand")]
6612 "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode))
6613 || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))"
6615 machine_mode src_mode = GET_MODE (operands[1]);
6616 if (targetm.can_change_mode_class (<MODE>mode, src_mode, VFP_REGS))
6618 emit_move_insn (operands[0], gen_lowpart (<MODE>mode, operands[1]));