]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Pass representative of live SLP node to vect_create_epilog_for_reduction master trunk
authorRichard Biener <rguenther@suse.de>
Fri, 22 Aug 2025 12:40:12 +0000 (14:40 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 22 Aug 2025 13:45:11 +0000 (15:45 +0200)
We passed the reduc_info which is close, but the representative is
more spot on and will not collide with making the reduc_info a
distinct type.

* tree-vect-loop.cc (vectorizable_live_operation): Pass
the representative of the PHIs node to
vect_create_epilog_for_reduction.

gcc/tree-vect-loop.cc

index d6b5042c08e4f7e94ad74ac6c66f0ccd4e0067fe..aab375a4d11c798b660077a28533c60355ce519d 100644 (file)
@@ -10280,16 +10280,17 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
       if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
        {
          slp_tree phis_node = slp_node_instance->reduc_phis;
+         stmt_info = SLP_TREE_REPRESENTATIVE (phis_node);
          for (auto exit : get_loop_exit_edges (LOOP_VINFO_LOOP (loop_vinfo)))
            if (exit != LOOP_VINFO_IV_EXIT (loop_vinfo))
              {
-               vect_create_epilog_for_reduction (loop_vinfo, reduc_info,
+               vect_create_epilog_for_reduction (loop_vinfo, stmt_info,
                                                  phis_node, slp_node_instance,
                                                  exit);
                break;
              }
          if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo))
-           vect_create_epilog_for_reduction (loop_vinfo, reduc_info,
+           vect_create_epilog_for_reduction (loop_vinfo, stmt_info,
                                              phis_node, slp_node_instance,
                                              LOOP_VINFO_IV_EXIT (loop_vinfo));
        }