Reload bug

Jan Hubicka jh@suse.cz
Fri Apr 11 17:49:00 GMT 2003


> > The code is wrong for post-SUBREG_BYTE patch as it checks that the
> > partial regs have exactly size of one word, but we do allow subregs on
> > registers of different sizes.  We need to verify that offset can
> > represent the register exactly.
> 
> Is it really wrong or is it incomplete now, in the post-SUBREG_BYTE era?

Yes, it would force, for instance subregs of SFmode registers in 64bit
sparc to be reloaded all the time (the original motivation for
SUBREG_BYTE)
> 
> > Looking as subreg_regno_offset, I think we need to practically check
> > that division in:
> >   return (y_offset / (mode_multiple / nregs_multiple)) * nregs_ymode;
> > Does not round.  When it rounds we are having registers too wide and we
> > must reload.
> > All the other divisions should be safe from SUBREG definition that is
> > already verified by my simplify_subreg code.
> > We also should add a trap to subreg_regno_offset in the mainline...
> > Seems to make sense?
> 
> Do you mean that we can generate
> 
> 	(subreg:HI (reg/v:SI 67) 2)
> 
> and we currently have no means to fix it during the reload pass?

Yes, we basically rely on the fact that we never generate them as we
originaly generated everything on word basic.

Honza
> 
> -- 
> Eric Botcazou



More information about the Gcc mailing list