tree-ssa-loop-im.c (determine_max_movement): Properly add condition cost to PHI cost...
authorRichard Biener <rguenther@suse.de>
Wed, 18 May 2016 12:32:46 +0000 (12:32 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 18 May 2016 12:32:46 +0000 (12:32 +0000)
2016-05-18  Richard Biener  <rguenther@suse.de>

* tree-ssa-loop-im.c (determine_max_movement): Properly add
condition cost to PHI cost instead of total_cost.

From-SVN: r236376

gcc/ChangeLog
gcc/tree-ssa-loop-im.c

index ff468c1..67c4042 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-18  Richard Biener  <rguenther@suse.de>
+
+       * tree-ssa-loop-im.c (determine_max_movement): Properly add
+       condition cost to PHI cost instead of total_cost.
+
 2016-05-18  Martin Liska  <mliska@suse.cz>
 
        PR fortran/70856
index ec0fb7f..b9cd0f6 100644 (file)
@@ -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