The following dumps the first root stmt when analyzing a BB reduction.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

        * tree-vect-slp.cc (vect_build_slp_instance): For BB reductions
        note the first root stmt.
---
 gcc/tree-vect-slp.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 6081948fed4..5fd9c8da89e 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -4213,6 +4213,13 @@ vect_build_slp_instance (vec_info *vinfo,
                         "Analyzing vectorizable control flow: %G",
                         root_stmt_infos[0]->stmt);
     }
+  else if (kind == slp_inst_kind_bb_reduc)
+    {
+      if (dump_enabled_p ())
+       dump_printf_loc (MSG_NOTE, vect_location,
+                        "Analyzing vectorizable BB reduction: %G",
+                        root_stmt_infos[0]->stmt);
+    }
 
   if (dump_enabled_p ())
     {
-- 
2.51.0

Reply via email to