This is the mail archive of the
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 10:13:33 -0600 (MDT)
- Subject: Re: [RFC] Fold floating-point comparisons
On Wed, 26 May 2004, Paolo Bonzini wrote:
> This patch implements the optimizations that Roger suggested in his
> message "[PATCH] Document a bunch of expression tree codes", and in
> general makes GCC able to combine floating-point comparisons.
Could you describe the intended semantics of your new LTGT_EXPR?
You'll notice that my patch above was primarily documenting tree
codes, so proposing a new new tree code without atleast documenting
it would appear to be more part of the problem than of the solution.
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.
Is LTGT_EXPR(x,y) supposed to be !isnan(x) && !isnan(y) && (x!=y)?
So LTGT_EXPR(x,y) == NOT_EXPR (UNEQ_EXPR (x, y))?
> Regtests are still to be written.
And as always you need to bootstrap and regression test your patch,
waiting for the regression tests to complete, checking that there
are no new failures or regressions and then post to the gcc-patches
list indicating the target triple that you tested on and these results.
The rules in contribute.html help avoid the common mistakes that can
break bootstrap or adversely affect the compiler.