This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, Fix PR 31098] a*C == b*C is not foldded to a == b with --fast-math/floating point


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]