Re: Wrong code: missing input reload

2011-06-01 Thread Bernd Schmidt
On 06/01/2011 06:06 PM, Georg-Johann Lay wrote: > From the internals description, HARD_FRAME_POINTER_REGNUM appears to > serve different purpose, and sources indicate that it is used similar, > i.e. per regno == HARD_FRAME_POINTER_REGNUM instead if having a rtx or > reg_class and test for overlaps

Re: Wrong code: missing input reload

2011-06-01 Thread Georg-Johann Lay
Bernd Schmidt schrieb: > On 06/01/2011 05:35 PM, Georg-Johann Lay wrote: > >> The reason for why a subreg of hardreg is there during reload is that >> on avr, r29:r28 is the frame pointer (word_mode is QI and Pmode is >> HI). Because in many places of the compiler, there are tests like "if >> (reg

Re: Wrong code: missing input reload

2011-06-01 Thread Bernd Schmidt
On 06/01/2011 05:35 PM, Georg-Johann Lay wrote: > The reason for why a subreg of hardreg is there during reload is that > on avr, r29:r28 is the frame pointer (word_mode is QI and Pmode is > HI). Because in many places of the compiler, there are tests like "if > (regno == FRAME_POINTER_REGNUM)", t

Re: Wrong code: missing input reload

2011-06-01 Thread Georg-Johann Lay
Bernd Schmidt schrieb: > On 06/01/2011 04:00 PM, Georg-Johann Lay wrote: >> Eric Botcazou schrieb: You are right, I was staring at the wrong place. subreg of hardreg should not be there. >>> You can take a look at PR target/48830, this is a related problem for the >>> SPARC where reload

Re: Wrong code: missing input reload

2011-06-01 Thread Bernd Schmidt
On 06/01/2011 04:00 PM, Georg-Johann Lay wrote: > Eric Botcazou schrieb: >>> You are right, I was staring at the wrong place. subreg of hardreg >>> should not be there. >> >> You can take a look at PR target/48830, this is a related problem for the >> SPARC where reload generates: >> >> (set (reg:

Re: Wrong code: missing input reload

2011-06-01 Thread Georg-Johann Lay
Eric Botcazou schrieb: >> You are right, I was staring at the wrong place. subreg of hardreg >> should not be there. > > You can take a look at PR target/48830, this is a related problem for the > SPARC where reload generates: > > (set (reg:SI 708 [ D.2989+4 ]) > (subreg:SI (reg:DI 72 %f40)

Re: Wrong code: missing input reload

2011-05-26 Thread Eric Botcazou
> You are right, I was staring at the wrong place. subreg of hardreg > should not be there. You can take a look at PR target/48830, this is a related problem for the SPARC where reload generates: (set (reg:SI 708 [ D.2989+4 ]) (subreg:SI (reg:DI 72 %f40) 4)) and (subreg:SI (reg:DI 72 %f40)

Re: Wrong code: missing input reload

2011-05-26 Thread Georg-Johann Lay
Eric Botcazou schrieb: Perhaps the original subreg shouldn't have been there? Yes, I'd think that everything in the RTL middle-end expects word-mode subregs of double-word-mode hard regs to be simplifiable. You are right, I was staring at the wrong place. subreg of hardreg should not be th

Re: Wrong code: missing input reload

2011-05-26 Thread Eric Botcazou
> Don't see a strict-low-part here. Why do you believe that this > should have an input reload? This is AVR so QImode is the word mode and the strict-low-part is implicit. > Perhaps the original subreg shouldn't have been there? Yes, I'd think that everything in the RTL middle-end expects word-

Re: Wrong code: missing input reload

2011-05-26 Thread Richard Henderson
On 05/26/2011 06:53 AM, Georg-Johann Lay wrote: > Trying to track faulty code generation because of a missing input > reload, I got lost in reload and need some help. > > The insn to reload (insn 7) is > > (set (subreg:QI (reg:HI 28) 0) > (const_int 0)) > > This insn generates one output re

Re: Wrong code: missing input reload

2011-05-26 Thread Georg-Johann Lay
Georg-Johann Lay wrote: > so there is a missing input reload, i.e. prior to insn 7 there must be > something like > > (set (reg:HI 28) > (reg:HI 24)) > Typo, that should read: (set (reg:HI 24) (reg:HI 28)) prior to insn 7.