[5/9] mips changes to adjust vec_perm_const hook

Message ID CAAgBjMmRxthq+npdqnkYPaV2t2x6WGAaEwOkb2HOCJr+08gPww@mail.gmail.com
State New
Headers
Series None |

Commit Message

Prathamesh Kulkarni May 18, 2022, 11:17 a.m. UTC
  Hi,
The attached patch adjusts vec_perm_const hook to accommodate the new parameter.
For rationale, please see:
https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html

Unfortunately, I am not sure how to cross test this patch.
make all-gcc stage-1 seems to build fine.
Is it OK to commit the patch ?

Thanks,
Prathamesh
  

Patch

diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
index e64928f4113..5eb845960e1 100644
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
@@ -21790,9 +21790,13 @@  mips_expand_vec_perm_const_1 (struct expand_vec_perm_d *d)
 /* Implement TARGET_VECTORIZE_VEC_PERM_CONST.  */
 
 static bool
-mips_vectorize_vec_perm_const (machine_mode vmode, rtx target, rtx op0,
-			       rtx op1, const vec_perm_indices &sel)
+mips_vectorize_vec_perm_const (machine_mode vmode, machine_mode op_mode,
+			       rtx target, rtx op0, rtx op1,
+			       const vec_perm_indices &sel)
 {
+  if (vmode != op_mode)
+    return false;
+
   struct expand_vec_perm_d d;
   int i, nelt, which;
   unsigned char orig_perm[MAX_VECT_LEN];