summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-31 01:04:43 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-31 01:04:43 +0000
commit13cf233a561830a6e4251f696c455ff4ef36d83f (patch)
treed0ebdc032b497ab7693d14e9cddb6b85dabf4828 /gcc
parent681e3417272d35439dc77fed523097548ff1e4c4 (diff)
downloadgcc-13cf233a561830a6e4251f696c455ff4ef36d83f.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171767 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ira-costs.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 68d3a8953ce..d5fceb8bdba 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
index 4a3083a65ab..dd3123c0887 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -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]);
}
}