[Bug tree-optimization/78071] New: -Os -ffast-math generates pow() for 1/(x*x)
colanderman at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Oct 21 18:07:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78071
Bug ID: 78071
Summary: -Os -ffast-math generates pow() for 1/(x*x)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: colanderman at gmail dot com
Target Milestone: ---
Created attachment 39865
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39865&action=edit
source code
The expression 1/(x*x) (where x is a double or float), when compiled with "-Os
-ffast-math" on Intel (e.g. -march=core2), is compiled as a call to pow() or
powf(). "-Os" and "-O3 -ffast-math" work as expected (generate a div + mul).
More information about the Gcc-bugs
mailing list