[Bug target/37633] [4.4 Regression] wrong register use on sh64
kkojima at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Sep 26 03:32:00 GMT 2008
------- Comment #1 from kkojima at gcc dot gnu dot org 2008-09-26 03:31 -------
I've tried
--- ORIG/trunk/gcc/ira-color.c Wed Sep 17 09:48:49 2008
+++ LOCAL/trunk/gcc/ira-color.c Thu Sep 25 12:09:30 2008
@@ -514,7 +514,9 @@ assign_hard_reg (ira_allocno_t allocno,
#endif
if (! ira_hard_reg_not_in_set_p (hard_regno, mode, conflicting_regs)
|| TEST_HARD_REG_BIT (prohibited_class_mode_regs[cover_class][mode],
- hard_regno))
+ hard_regno)
+ || (ALLOCNO_CALLS_CROSSED_NUM (allocno) != 0
+ && HARD_REGNO_CALL_PART_CLOBBERED (hard_regno, mode)))
continue;
cost = costs[i];
full_cost = full_costs[i];
@@ -3064,7 +3066,9 @@ ira_fast_allocation (void)
#endif
if (!ira_hard_reg_not_in_set_p (hard_regno, mode, conflict_hard_regs)
|| (TEST_HARD_REG_BIT
- (prohibited_class_mode_regs[cover_class][mode], hard_regno)))
+ (prohibited_class_mode_regs[cover_class][mode], hard_regno))
+ || (ALLOCNO_CALLS_CROSSED_NUM (a) != 0
+ && HARD_REGNO_CALL_PART_CLOBBERED (hard_regno, mode)))
continue;
ALLOCNO_HARD_REGNO (a) = hard_regno;
for (r = ALLOCNO_LIVE_RANGES (a); r != NULL; r = r->next)
It works for me, though it could be completely wrong.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37633
More information about the Gcc-bugs
mailing list