This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fp->int folding broken. again.
On Thu, Oct 16, 2003 at 09:45:29AM -0600, Roger Sayle wrote:
> p.s. I have a suggestion. The code genopinit that generates the check
> for FIXUNS_TRUNC_LIKE_FIX_TRUNC blissfully overwrites the ufixtrunc
> optab with the sfixtrunc optab. Perhaps a more flexible approach would
> be to update ufixtrunc only if it was previously CODE_FOR_nothing.
> This would allow backends that define FIXUNS_TRUNC_LIKE_FIX_TRUNC as
> a default, to still usefully provide fixuns_trunc* patterns.
>
> Does this sound like a useful enhancement? Sorry again.
No. I wish I'd looked into this harder.
I think there's exactly one reason to have this macro, and that
is some odd case in which the same fp value is converted to both
signed and unsigned integers. In that case we'll be able to cse
the fix insn. Frankly, I don't find this very compelling.
I'm thinking that what we should actually do is force the 9
targets that define FIXUNS_TRUNC_LIKE_FIX_TRUNC to instead define
the appropriate unsigned fix patterns.
r~