This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/37633] [4.4 Regression] wrong register use on sh64
- From: "kkojima at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2008 03:31:02 -0000
- Subject: [Bug target/37633] [4.4 Regression] wrong register use on sh64
- References: <bug-37633-5208@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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