From 524c2492c505c5bd6f0ec0e6752f7aef8cfbfc05 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 18 May 2016 12:32:46 +0000 Subject: [PATCH] tree-ssa-loop-im.c (determine_max_movement): Properly add condition cost to PHI cost instead of total_cost. 2016-05-18 Richard Biener * tree-ssa-loop-im.c (determine_max_movement): Properly add condition cost to PHI cost instead of total_cost. From-SVN: r236376 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-loop-im.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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