https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81362
--- Comment #5 from rdapp at linux dot vnet.ibm.com ---
Ah, npeel is set by vect_peeling_hash_get_lowest_cost although the
corresponding dr is not used afterwards. It should be save to get rid of the
npeel parameter since we use the returned peeling's npeel anyway. I think the
same is true for
body_cost_vec but it's not used afterwards so doesn't cause problems.
The following fixes the regression for me:
index 5103ba1..257be41 100644
[0/92965]
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -1347,7 +1347,6 @@ vect_peeling_hash_get_lowest_cost (_vect_peel_info
**slot,
static struct _vect_peel_extended_info
vect_peeling_hash_choose_best_peeling (hash_table<peel_info_hasher>
*peeling_htab,
loop_vec_info loop_vinfo,
- unsigned int *npeel,
stmt_vector_for_cost *body_cost_vec)
{
struct _vect_peel_extended_info res;
@@ -1371,7 +1370,6 @@ vect_peeling_hash_choose_best_peeling
(hash_table<peel_info_hasher> *pee
ling_hta
res.outside_cost = 0;
}
- *npeel = res.peel_info.npeel;
*body_cost_vec = res.body_cost_vec;
return res;
}
@@ -1812,7 +1810,7 @@ vect_enhance_data_refs_alignment (loop_vec_info
loop_vinfo)
unless aligned. So we try to choose the best possible peeling from
the hash table. */
peel_for_known_alignment = vect_peeling_hash_choose_best_peeling
- (&peeling_htab, loop_vinfo, &npeel, &body_cost_vec);
+ (&peeling_htab, loop_vinfo, &body_cost_vec);
}
/* Compare costs of peeling for known and unknown alignment. */