This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: small patch to fix IRA crash of m68k compiler


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;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]