From ac1724ccfdb9056d59fc21500c57c4edc963e653 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 28 Oct 2020 12:59:07 +0100 Subject: [PATCH] dump reason for throwing away SLP instance This adds dumping to vect_slp_analyze_node_alignment when it fails an SLP instance due to shared vector type conflicts. 2020-10-28 Richard Biener * tree-vect-data-refs.c (vect_slp_analyze_node_alignment): Dump when vect_update_shared_vectype fails. --- gcc/tree-vect-data-refs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 4abd27e4c70..fd14b480dbf 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2428,7 +2428,13 @@ vect_slp_analyze_node_alignment (vec_info *vinfo, slp_tree node) /* We need to commit to a vector type for the group now. */ if (is_a (vinfo) && !vect_update_shared_vectype (first_stmt_info, SLP_TREE_VECTYPE (node))) - return false; + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "desired vector type conflicts with earlier one " + "for %G", first_stmt_info->stmt); + return false; + } dr_vec_info *dr_info = STMT_VINFO_DR_INFO (first_stmt_info); vect_compute_data_ref_alignment (vinfo, dr_info); -- 2.30.2