This fixes an ICE that affects some testsuite compiles that use vector extensions, but probably not much real code (certainly not for offloading).

Andrew
amdgcn: Disallow TImode vector permute

We don't support it and it doesn't happen without vector extensions, so
just remove the unhandled case.

Fixes gcc.dg/pr78575.c failure.

gcc/ChangeLog:

        * config/gcn/gcn.cc (gcn_vectorize_vec_perm_const): Disallow TImode.

diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 52c8a0e409c..22d2b6ebf6d 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -5050,7 +5050,9 @@ gcn_vectorize_vec_perm_const (machine_mode vmode, 
machine_mode op_mode,
                              rtx dst, rtx src0, rtx src1,
                              const vec_perm_indices & sel)
 {
-  if (vmode != op_mode)
+  if (vmode != op_mode
+      || !VECTOR_MODE_P (vmode)
+      || GET_MODE_INNER (vmode) == TImode)
     return false;
 
   unsigned int nelt = GET_MODE_NUNITS (vmode);

Reply via email to