diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff468c152ef..67c4042d402 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-05-18 Richard Biener + + * tree-ssa-loop-im.c (determine_max_movement): Properly add + condition cost to PHI cost instead of total_cost. + 2016-05-18 Martin Liska PR fortran/70856 diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index ec0fb7fcb46..b9cd0f6bac6 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -717,7 +717,7 @@ determine_max_movement (gimple *stmt, bool must_preserve_exec) return false; def_data = get_lim_data (SSA_NAME_DEF_STMT (val)); if (def_data) - total_cost += def_data->cost; + lim_data->cost += def_data->cost; } /* We want to avoid unconditionally executing very expensive