[PATCH] checking version of rtl flag access macros

Janis Johnson janis187@us.ibm.com
Thu May 16 11:37:00 GMT 2002


On Thu, May 16, 2002 at 03:15:14PM -0300, Alexandre Oliva wrote:
> On May 15, 2002, Janis Johnson <janis187@us.ibm.com> wrote:
> 
> >> > @@ -8079,7 +8079,8 @@ reload_cse_simplify (insn)
> >> >        if (!count && reload_cse_noop_set_p (body))
> >> >         {
> >> >           rtx value = SET_DEST (body);
> >> > -         if (! REG_FUNCTION_VALUE_P (SET_DEST (body)))
> >> > +         if (GET_CODE (body) == REG
> >> > +             && ! REG_FUNCTION_VALUE_P (SET_DEST (body)))
> >> >             value = 0;
> >> >           reload_cse_delete_noop_set (insn, value);
> >> >           return;
> >> 
> >> /Krister
> 
> > Eww.  It was supposed to verify that the argument to REG_FUNCTION_VALUE_P
> > is REG, so it should be "GET_CODE (SET_DEST (body)) == REG".  Can you try
> > that on your system?
> 
> Err...  Why not:
> 
>                if (GET_CODE (value)
>                    && ! REG_FUNCTION_VALUE_P (value))
> 
> ?

I assume you meant:

        if (GET_CODE (value) == REG
            && ! REG_FUNCTION_VALUE_P (value))

which does make sense.

Is anyone actually planning to do a patch for this?  I can, but the
systems I normally test on don't fail with the current code so they
wouldn't be much of a check.  Is there a cross target with a simulator
where this failed before?

Janis



More information about the Gcc-patches mailing list