re PR middle-end/48367 (200.sixtrack/301.apsi in SPEC CPU 2000 are miscompiled)
authorVladimir Makarov <vmakarov@redhat.com>
Thu, 31 Mar 2011 01:04:43 +0000 (01:04 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Thu, 31 Mar 2011 01:04:43 +0000 (01:04 +0000)
2011-03-30  Vladimir Makarov  <vmakarov@redhat.com>

PR middle-end/48367
* ira-costs.c (find_costs_and_classes): Fix a typo in i_mem_cost
calculation.

From-SVN: r171767

gcc/ChangeLog
gcc/ira-costs.c

index 68d3a8953ce89d4955eb434de2a4a31efbca2051..d5fceb8bdba900644058bda81da1725e24720da3 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-30  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR middle-end/48367
+       * ira-costs.c (find_costs_and_classes): Fix a typo in i_mem_cost
+       calculation.
+
 2011-03-30  Jeff Law  <law@redhat.com>
 
        * PR bootstrap/48371
index 4a3083a65ab5f64f55bea31576321f40977fa9fe..dd3123c0887367862f8d6802000a3e688e6830bd 100644 (file)
@@ -1652,7 +1652,7 @@ find_costs_and_classes (FILE *dump_file)
                        i_costs[k] += add_cost;
                    }
                  add_cost = COSTS (costs, a_num)->mem_cost;
-                 if (add_cost && INT_MAX - add_cost < i_mem_cost)
+                 if (add_cost > 0 && INT_MAX - add_cost < i_mem_cost)
                    i_mem_cost = INT_MAX;
                  else
                    i_mem_cost += add_cost;
@@ -1887,7 +1887,7 @@ process_bb_node_for_hard_reg_moves (ira_loop_tree_node_t loop_tree_node)
       ALLOCNO_HARD_REG_COSTS (a)[i] -= cost;
       ALLOCNO_CONFLICT_HARD_REG_COSTS (a)[i] -= cost;
       ALLOCNO_CLASS_COST (a) = MIN (ALLOCNO_CLASS_COST (a),
-                                         ALLOCNO_HARD_REG_COSTS (a)[i]);
+                                   ALLOCNO_HARD_REG_COSTS (a)[i]);
     }
 }