[Bug tree-optimization/71078] New: x/abs(x) -> sign(1.0,x)
Joost.VandeVondele at mat dot ethz.ch
gcc-bugzilla@gcc.gnu.org
Thu May 12 07:00:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71078
Bug ID: 71078
Summary: x/abs(x) -> sign(1.0,x)
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: Joost.VandeVondele at mat dot ethz.ch
Target Milestone: ---
just noticed in some legacy code the equivalent of this construct:
REAL FUNCTION mysign(x)
REAL :: x
mysign=x/abs(x)
END FUNCTION
which I would expect to be converted to some form of copysign function with
'-O3 -ffast-math', but it is not.
More information about the Gcc-bugs
mailing list