Rask Ingemann Lambertsen <[EMAIL PROTECTED]> 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))
{