]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm: [MVE intrinsics] factorize vqshluq
authorChristophe Lyon <christophe.lyon@arm.com>
Mon, 27 Feb 2023 14:13:00 +0000 (14:13 +0000)
committerChristophe Lyon <christophe.lyon@arm.com>
Fri, 12 May 2023 10:40:37 +0000 (12:40 +0200)
Factorize vqshluq builtins so that they use parameterized names.

2022-12-12  Christophe Lyon  <christophe.lyon@arm.com>

gcc/
* config/arm/iterators.md (mve_insn): Add vqshlu.
(supf): Add VQSHLUQ_M_N_S, VQSHLUQ_N_S.
(VQSHLUQ_M_N, VQSHLUQ_N): New.
* config/arm/mve.md (mve_vqshluq_n_s<mode>): Change name into ...
(@mve_<mve_insn>q_n_<supf><mode>): ... this.
(mve_vqshluq_m_n_s<mode>): Change name into ...
(@mve_<mve_insn>q_m_n_<supf><mode>): ... this.

gcc/config/arm/iterators.md
gcc/config/arm/mve.md

index 116dd95fd882e8162379dcf2f178b7f6aa7dc8f9..d1d14488b56186d0326cee75141b0a0a81d06780 100644 (file)
                 (VQSHLQ_N_S "vqshl") (VQSHLQ_N_U "vqshl")
                 (VQSHLQ_R_S "vqshl") (VQSHLQ_R_U "vqshl")
                 (VQSHLQ_S "vqshl") (VQSHLQ_U "vqshl")
+                (VQSHLUQ_M_N_S "vqshlu")
+                (VQSHLUQ_N_S "vqshlu")
                 (VQSHRNBQ_M_N_S "vqshrnb") (VQSHRNBQ_M_N_U "vqshrnb")
                 (VQSHRNBQ_N_S "vqshrnb") (VQSHRNBQ_N_U "vqshrnb")
                 (VQSHRNTQ_M_N_S "vqshrnt") (VQSHRNTQ_M_N_U "vqshrnt")
                       (VRMLSLDAVHAXQ_P_S "s")
                       (VRMLSLDAVHAXQ_S "s")
                       (VRMLALDAVHAQ_P_S "s") (VRMLALDAVHAQ_P_U "u")
+                      (VQSHLUQ_M_N_S "s")
+                      (VQSHLUQ_N_S "s")
                       ])
 
 ;; Both kinds of return insn.
 (define_int_iterator UQRSHLLQ [UQRSHLL_64 UQRSHLL_48])
 (define_int_iterator SQRSHRLQ [SQRSHRL_64 SQRSHRL_48])
 (define_int_iterator VSHLCQ_M [VSHLCQ_M_S VSHLCQ_M_U])
+(define_int_iterator VQSHLUQ_M_N [VQSHLUQ_M_N_S])
+(define_int_iterator VQSHLUQ_N [VQSHLUQ_N_S])
 
 ;; Define iterators for VCMLA operations
 (define_int_iterator VCMLA_OP [UNSPEC_VCMLA
index b4faf7a4b18dd5c1f26684b246a79ace842f064d..7898361b859ab07e520cd5b5b784db835ab468f3 100644 (file)
 ;;
 ;; [vqshluq_n_s])
 ;;
-(define_insn "mve_vqshluq_n_s<mode>"
+(define_insn "@mve_<mve_insn>q_n_<supf><mode>"
   [
    (set (match_operand:MVE_2 0 "s_register_operand" "=w")
        (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "w")
                       (match_operand:SI 2 "<MVE_pred>" "<MVE_constraint>")]
-        VQSHLUQ_N_S))
+        VQSHLUQ_N))
   ]
   "TARGET_HAVE_MVE"
-  "vqshlu.s%#<V_sz_elem>\t%q0, %q1, %2"
+  "<mve_insn>.<supf>%#<V_sz_elem>\t%q0, %q1, %2"
   [(set_attr "type" "mve_move")
 ])
 
 ;;
 ;; [vqshluq_m_n_s])
 ;;
-(define_insn "mve_vqshluq_m_n_s<mode>"
+(define_insn "@mve_<mve_insn>q_m_n_<supf><mode>"
   [
    (set (match_operand:MVE_2 0 "s_register_operand" "=w")
        (unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand" "0")
                       (match_operand:MVE_2 2 "s_register_operand" "w")
                       (match_operand:SI 3 "<MVE_pred>" "<MVE_constraint>")
                       (match_operand:<MVE_VPRED> 4 "vpr_register_operand" "Up")]
-        VQSHLUQ_M_N_S))
+        VQSHLUQ_M_N))
   ]
   "TARGET_HAVE_MVE"
-  "vpst\n\tvqshlut.s%#<V_sz_elem>\t%q0, %q2, %3"
+  "vpst\n\t<mve_insn>t.<supf>%#<V_sz_elem>\t%q0, %q2, %3"
   [(set_attr "type" "mve_move")
    (set_attr "length" "8")])