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 ff468c152efd8aaac876764e90c9232de6eda8b6..67c4042d40224452b3745b158aae049525fc0daf 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 ec0fb7fcb463f45da17bcb8f6e95145654f90a4a..b9cd0f6bac6b94192bf1d2bf2d88387ddcb8adf3 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