https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64225
Richard Biener rguenth at gcc dot gnu.org changed:
What|Removed |Added
CC||wschmidt at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64225
--- Comment #1 from Bernard Ogden bernie.ogden at linaro dot org ---
Created attachment 34218
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34218action=edit
-v output
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64225
ktkachov at gcc dot gnu.org changed:
What|Removed |Added
CC||ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64225
ktkachov at gcc dot gnu.org changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64225
--- Comment #4 from ktkachov at gcc dot gnu.org ---
Add -fno-math-errno removes the call to pow. We've seen similar issues before
with other math builtins. The problem is that the midend/frontend generates the
pow call without remembering that by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64225
--- Comment #5 from jgreenhalgh at gcc dot gnu.org ---
I've seen similar behavior on an HPC benchmark I was looking at.
The problem here is the interaction between fold-const.c, other passes, and
-fmath-errno.
Take this testcase:
void
foo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64225
--- Comment #6 from ktkachov at gcc dot gnu.org ---
fold-const.c has a comment in the relevant case that says:
/* Canonicalize x*x as pow(x,2.0), which is expanded as x*x. */
So we should look at why is it not being expanded as such unless
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64225
--- Comment #7 from ktkachov at gcc dot gnu.org ---
(In reply to ktkachov from comment #6)
fold-const.c has a comment in the relevant case that says:
/* Canonicalize x*x as pow(x,2.0), which is expanded as x*x. */
I think this comment is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64225
--- Comment #8 from joseph at codesourcery dot com joseph at codesourcery dot
com ---
Expanding x * x (or any such multiplication) to a call to pow is
inherently dubious because the semantics of multiplication never include
clobbering errno,