This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Fix PR 31098] a*C == b*C is not foldded to a == b with --fast-math/floating point
- From: Tom Tromey <tromey at redhat dot com>
- To: Pranav Bhandarkar <pranav dot bhandarkar at celunite dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 08 Oct 2007 09:24:58 -0600
- Subject: Re: [PATCH, Fix PR 31098] a*C == b*C is not foldded to a == b with --fast-math/floating point
- References: <470900FD.1090105@celunite.com>
- Reply-to: tromey at redhat dot com
>>>>> "Pranav" == Pranav Bhandarkar <pranav.bhandarkar@celunite.com> writes:
Pranav> 2007-10-07 Pranav Bhandarkar <pranav.bhandarkar@celunite.com>
Pranav> * fold-const.c (fold_comparison): fold (a OP c) CMP (b OP c) -> a
Pranav> CMP b, iff c is not zero
Pranav> * testsuite/pr31098.c: New
This does the wrong thing for:
int f(float a, float b)
{
return a*-10 >= b*-10;
}
Tom