This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Fold floating-point comparisons
- From: Roger Sayle <roger at eyesopen dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 May 2004 12:36:34 -0600 (MDT)
- Subject: Re: [RFC] Fold floating-point comparisons
On Wed, 26 May 2004, Paolo Bonzini wrote:
> The same as the RTL operator LTGT, basically a negated UNEQ as you
> guessed. This 14th (!) operator is only present in RTL codes, but
> not in tree codes.
Ah. Another example of missing internals documentation. My approach
was to document the semantics first, and then once documented propose
a patch to fix PR rtl-optimization/15649.
> > Floating point equality and inequality operators, i.e. EQ_EXPR,
> > NE_EXPR and UNEQ_EXPR don't trap. So I'd recommend that the same
> > apply for your new LTGT_EXPR.
>
> I guessed the same, but the question is actually what LTGT does...
This is the direct benefit to a programmer of writing internal
documentation. The person that writes the documentation gets to
define the semantics. In this case, we get to choose that LTGT
shouldn't trap :>
> And I of course will write them. I had no time to write regtests of
> any kind, document, and even run preexisting regtests -- I just posted
> a preliminary patch to ensure the basic idea is fine.
Yep. The basic idea itself looks good.
Roger
--