From bd7c238e3c36c872111eb6ffb0e8f75a4a4d2f41 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 22 Aug 2025 14:40:12 +0200 Subject: [PATCH] Pass representative of live SLP node to vect_create_epilog_for_reduction 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index d6b5042c08e..aab375a4d11 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -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)); } -- 2.47.2