This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/48139] __builtin_lrintf() becomes a library call, not an cvtss2si instruction
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Mar 2011 23:35:01 +0000
- Subject: [Bug target/48139] __builtin_lrintf() becomes a library call, not an cvtss2si instruction
- Auto-submitted: auto-generated
- References: <bug-48139-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48139
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-16 23:35:00 UTC ---
POSIX says:
These functions shall fail if:
Domain Error
The x argument is NaN or ÂInf, or the correct value is not representable as an
integer.
If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
then errno shall be set to [EDOM]. If the integer
expression (math_errhandling & MATH_ERREXCEPT) is non-zero, then the invalid
floating-point exception shall be raised.
so we can't optimize it without -fno-math-errno.