]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Split arguments of expand_vec_perm
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Sun, 4 Jun 2023 09:25:03 +0000 (17:25 +0800)
committerPan Li <pan2.li@intel.com>
Mon, 5 Jun 2023 00:51:06 +0000 (08:51 +0800)
Since the following patch will calls expand_vec_perm with
splitted arguments, change the expand_vec_perm interface in
this patch.

gcc/ChangeLog:

* config/riscv/autovec.md: Split arguments.
* config/riscv/riscv-protos.h (expand_vec_perm): Ditto.
* config/riscv/riscv-v.cc (expand_vec_perm): Ditto.

gcc/config/riscv/autovec.md
gcc/config/riscv/riscv-protos.h
gcc/config/riscv/riscv-v.cc

index 4fe0e3253dc2a1c64f50dcdfd4fde8becaeeffa6..9f4492db23cb567d494b8caa0c81ad4870f69272 100644 (file)
@@ -96,7 +96,8 @@
    (match_operand:<VINDEX> 3 "vector_perm_operand")]
   "TARGET_VECTOR && GET_MODE_NUNITS (<MODE>mode).is_constant ()"
   {
-    riscv_vector::expand_vec_perm (operands);
+    riscv_vector::expand_vec_perm (operands[0], operands[1],
+                                  operands[2], operands[3]);
     DONE;
   }
 )
index d032f569a3682954f28fc235d41d5e7997b082ae..00e1b20c6c69d7aa08b3da87145ee78b543915f4 100644 (file)
@@ -241,7 +241,7 @@ opt_machine_mode get_mask_mode (machine_mode);
 void expand_vec_series (rtx, rtx, rtx);
 void expand_vec_init (rtx, rtx);
 void expand_vcond (rtx *);
-void expand_vec_perm (rtx *);
+void expand_vec_perm (rtx, rtx, rtx, rtx);
 /* Rounding mode bitfield for fixed point VXRM.  */
 enum vxrm_field_enum
 {
index 75cf00b7eba7119236f2fcc6e26514a734d50cac..382f95cdfce203f6cbc2e97122ffb584f0876941 100644 (file)
@@ -2024,12 +2024,8 @@ emit_vlmax_masked_gather_mu_insn (rtx target, rtx op, rtx sel, rtx mask)
 /* Implement vec_perm<mode>.  */
 
 void
-expand_vec_perm (rtx *operands)
+expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel)
 {
-  rtx target = operands[0];
-  rtx op0 = operands[1];
-  rtx op1 = operands[2];
-  rtx sel = operands[3];
   machine_mode data_mode = GET_MODE (target);
   machine_mode sel_mode = GET_MODE (sel);