This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 35232: Recent regression due to reload inheritance bug
- From: Richard Sandiford <rsandifo at nildram dot co dot uk>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 Feb 2008 09:26:53 +0000
- Subject: Re: PR 35232: Recent regression due to reload inheritance bug
- References: <47BA027F.8060401@gmail.com>
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.
richard