This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: small patch to fix IRA crash of m68k compiler
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Gerald Pfeifer <gerald at pfeifer dot com>
- Date: Mon, 08 Sep 2008 18:03:03 -0400
- Subject: Re: RFA: small patch to fix IRA crash of m68k compiler
- References: <48C579A8.5010109@redhat.com> <alpine.LSU.1.99.0809082117390.3773@acrux.dbai.tuwien.ac.at> <48C57C41.4080302@redhat.com> <jetzcqo13w.fsf@sykes.suse.de>
Andreas Schwab wrote:
Vladimir Makarov <vmakarov@redhat.com> writes:
Index: ira-conflicts.c
===================================================================
--- ira-conflicts.c (revision 140014)
+++ ira-conflicts.c (working copy)
@@ -366,6 +366,9 @@ process_regs_for_copy (rtx reg1, rtx reg
}
else
return false;
+ if (hard_regno < 0)
+ /* Can not be tied. */
+ return false;
IMHO this is just papering over the bug. Please explain the meaning of
the expressions for hard_rego. What is the significance of an unrelated
register wrt. this insn for the function?
I don't think that is just papering of the bug.
(insn 22 17 28 4 /cvs/gcc/libgcc/../gcc/libgcc2.c:169 (set (reg/i:SI 0 %d0)
(subreg:SI (reg/v:DI 30 [ w ]) 4)) 36 {*movsi_m68k2} (expr_list:REG_DEAD (reg/v:DI 30 [ w ])
(nil)))
Hard_regno here means hard register preference for pseudo#30 to remove
the insn. It is not possible in this case. It would be possible if the
destination register would be >= 1.
Another impossibility in this case would be that the destination
register is first hard-register of p30 cover class and this is checked
below by
index = ira_class_hard_reg_index[cover_class][hard_regno];
if (index < 0)
/* Can not be tied. It is not in the cover class. */
return false;