diff mbox series

[4/4] vect: Add more dump messages for VLA SLP permutation

Message ID 20241004104054.2653382-5-richard.sandiford@arm.com
State New
Headers show
Series [1/4] vect: Variable lane indices in vectorizable_slp_permutation_1 | expand

Commit Message

Richard Sandiford Oct. 4, 2024, 10:40 a.m. UTC
Taking the !repeating_p route for VLA vectors causes analysis
to fail, but it wasn't clear from the dump files when this
had happened, and which node caused it.

gcc/
	PR tree-optimization/116583
	* tree-vect-slp.cc (vectorizable_slp_permutation_1): Add more
	dump messages.
---
 gcc/tree-vect-slp.cc | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 66f5906ebb9..56fb55cb628 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -10319,10 +10319,22 @@  vectorizable_slp_permutation_1 (vec_info *vinfo, gimple_stmt_iterator *gsi,
 	 instead of relying on the pattern described above.  */
       if (!nunits.is_constant (&npatterns)
 	  || !TYPE_VECTOR_SUBPARTS (op_vectype).is_constant ())
-	return -1;
+	{
+	  if (dump_p)
+	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+			     "unsupported permutation %p on variable-length"
+			     " vectors\n", (void *) node);
+	  return -1;
+	}
       nelts_per_pattern = ncopies = 1;
       if (linfo && !LOOP_VINFO_VECT_FACTOR (linfo).is_constant (&ncopies))
-	return -1;
+	{
+	  if (dump_p)
+	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+			     "unsupported permutation %p for variable VF\n",
+			     (void *) node);
+	  return -1;
+	}
       pack_p = false;
       unpack_factor = 1;
     }