]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vect: Add more dump messages for VLA SLP permutation [PR116583]
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 7 Oct 2024 12:03:05 +0000 (13:03 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 7 Oct 2024 12:03:05 +0000 (13:03 +0100)
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

index a5cd596fd285bab52eac51123ec4789c45037a4f..849863c15057cf00e64b88719f583f26810101f5 100644 (file)
@@ -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;
     }