Bug 35289 - missing CSE of division (lack of reassociation)
Summary: missing CSE of division (lack of reassociation)
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:
 
Reported: 2008-02-22 06:44 UTC by davidxl
Modified: 2008-12-29 06:47 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-12-29 06:47:44


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description davidxl 2008-02-22 06:44:08 UTC
double a,b,c,d,e,f;
// int  a,b,c,d,e,f;

void foo()
{
   e = b*c/d;
   f = b/d*a;
}

Compile with -O3 -ffast-math, b/d should be CSEed.
Comment 1 Richard Biener 2008-02-22 10:52:09 UTC
Confirmed.