https://gcc.gnu.org/g:03299164830e19405b35a5fa862e248df4ea01e2
commit r15-4115-g03299164830e19405b35a5fa862e248df4ea01e2 Author: Richard Sandiford <richard.sandif...@arm.com> Date: Mon Oct 7 13:03:05 2024 +0100 vect: Add more dump messages for VLA SLP permutation [PR116583] 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. Diff: --- gcc/tree-vect-slp.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index a5cd596fd285..849863c15057 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -10333,10 +10333,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; }