This is the mail archive of the gcc@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: live insns deleted by delete_trivially_dead_insns()


Rask Ingemann Lambertsen <rask@sygehus.dk> writes:

> I'm seeing miscompilation of newlib's memcmp() for my 16-bit ix86 port. The
> REG_RETVAL and REG_LIBCALL notes seem to play an important part in the
> failure. From the first subreg dump:

Try this:

Index: gcc/lower-subreg.c
===================================================================
--- gcc/lower-subreg.c	(revision 124389)
+++ gcc/lower-subreg.c	(working copy)
@@ -610,7 +610,7 @@ resolve_reg_notes (rtx insn)
   rtx *pnote, note;
 
   note = find_reg_equal_equiv_note (insn);
-  if (note)
+  if (note || find_reg_note (insn, REG_RETVAL, NULL) != NULL_RTX)
     {
       if (for_each_rtx (&XEXP (note, 0), resolve_subreg_use, NULL))
 	{


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