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.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
* 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 75e05009d50..d124117f00d 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -10275,16 +10275,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.43.0