Bug 31098 - a*C == b*C is not foldded to a == b with --fast-math/floating point
Summary: a*C == b*C is not foldded to a == b with --fast-math/floating point
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.3.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks: 19987
  Show dependency treegraph
 
Reported: 2007-03-09 09:10 UTC by Andrew Pinski
Modified: 2007-07-01 01:14 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-07-01 01:14:43


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2007-03-09 09:10:06 UTC
The following two functions should be equalivant with --fast-math:
int f(float a, float b)
{
  return a*10 == b*10;
}
int f1(float a, float b)
{
  return a == b;
}
Comment 1 Richard Biener 2007-03-09 10:37:01 UTC
Confirmed.