PR 35232: Recent regression due to reload inheritance bug

Jakub Jelinek jakub@redhat.com
Tue Feb 19 14:01:00 GMT 2008


On Tue, Feb 19, 2008 at 09:26:53AM +0000, Richard Sandiford wrote:
> Uros Bizjak <ubizjak@gmail.com> writes:
> > If we choose to go this way, the easiest solution is to disable 
> > following "if" in optabs.c, line 5148:
> >
> >   /* Unsigned integer, and no way to convert directly.  Convert as signed,
> >      then unconditionally adjust the result.  */
> >   if (unsignedp && can_do_signed)
> >
> > This will disable generic expansion of unsigned float conversion through 
> > signed float insn. For x87, we provide SImode and DImode float pattern, 
> > so this change will result in a libcall for "unsigned long long" 
> > argument. For SSE targets, we provide unsigned float patterns for 
> > SImode, so "unsigned long long" will also be affected. For 64bit 
> > targets, we provide DImode patterns, so at least there is no problems.
> >
> > OTOH, I wonder how it is possible that my optabs.c change uncovered 
> > latent bug you mentioned. Before my patch, we always expanded through 
> > this generic code - please note logical "or" with !DECIMAL_FLOAT_MODE, 
> > and my patch in fact disabled this wrong shortcut when neither signed 
> > nor unsigned float pattern was available.
> 
> The bug affects MIPS16 code, which does not have access to the FPU.
> As you say, before your patch, we were wrongly using the "unsigned in
> terms of signed" fallback regardless of whether signed hardware support
> was actually available.  This fallback was inefficient, but happened
> to avoid the reload bug.  Now we go through the "proper" path and the
> bug is exposed.

For 4.3, have you considered just adding new mips.md patterns which would
expand to whatever you need to workaround the reload problem (whether it is
expand unsigned in terms of signed fallback or something else)?

	Jakub



More information about the Gcc-patches mailing list