Reload problem. Was: Re: split_edge, reg-stack and function.c fix

Jan Hubicka
Wed Jan 5 04:06:00 GMT 2000

> On Tue, Jan 04, 2000 at 10:37:33PM -0700, Jeffrey A Law wrote:
> > Sigh.  More death note lossage.  In a pure sense I would claim regstack
> > and the ia32 backend are braindead and shouldn't abuse notes like that.
> Yeah well.  On a brighter note, Jan *has* done all the work
> for fixing that.  All we gotta do is review it.  ;-)

Interestingly enought yesterday I got enought power to force myself to
re-do the predicates patch. It works now, only surfers problem with
The unary operators matched in operand makes reload to miss requirence
of secondary memory for the reload and results in incorrect insn.

This affect about 4 testsuites and bootstrap + other tests I've made
rest seems to work. The actual problem can be best seen on:

 float a;
 return (double)a+1;

That results in code:

(insn 9 27 12 (parallel[ 
            (set (reg/v:SF 24)
                (asm_operands ("") ("=r") 0[ ] 
                    [ ]  ("q.c") 5))
            (clobber (reg:QI 18 fpsr))
            (clobber (reg:QI 17 flags))
        ] ) -1 (nil)
    (expr_list:REG_UNUSED (reg:QI 18 fpsr)
        (expr_list:REG_UNUSED (reg:QI 17 flags)

(insn 15 14 17 (set (reg:DF 25)
        (plus:DF (float_extend:DF (reg/v:SF 24))
            (mem/u:DF (symbol_ref/u:SI ("*.LC0")) 0))) 458 {*fop_comm_1} (insn_list 9 (nil))
    (expr_list:REG_DEAD (reg/v:SF 24)

Requiring reload of register 24 from "r" class to "f" class
But reload attempts to construct:

(insn 30 14 15 (set (reg:DF 8 st(0))
        (float_extend:DF (reg/v:SF 0 eax))) 126 {*extendsfdf2_1} (nil)

And that of course don't match.

My last attempt to fix this (to completely hide all unary operators behind
reload) was refused by the Jeff, because it would break some ports, so I am
now trying to develop another one, but I think it is too symptomatic
and it still don't want to work for some purpose.

So maybe I will clenup the predicates patch (it is the largest, most anoying
and most mechanical change needed for INDREG patches), so you can review it,
reproduce this problem and we should discuss proper fix for reload.

One idea that came to me is target macro deciding whether given unary operand
is expected to hidden behind reload or not. But this is rather nasty.

It can take me about hour or so to re-read the whole patch, fix formating
problems and send it to the list.

> r~

More information about the Gcc-patches mailing list