This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386]: Implement lrint and llrint as x87 intrinsic function, TAKE 2


On 8/17/06, Uros Bizjak <uros.bizjak@kss-loka.si> wrote:
Quoting Richard Guenther <richard.guenther@gmail.com>:

 >> This patch implements lrint and llrint as x87 instrinsic function. This
 >> patch fits into BUILT_IN_LLRINT and BUILT_IN_LRINT middle-level
 >> infrastructure that was jus comitted to mainline.

 > Was there a particular reason to use these only if
 > flag_unsafe_math_optimizations?



They don't set errno when argument is too large.

That would be !flag_errno_math. flag_unsafe_math_optimizations doesn't care about errno. The builtin expanders in builtins.c care about emitting extra code if flag_errno_math is true, so backend patterns do not need to care about errno (which is my understanding).

So, is the lrint expansion computing wrong values in certain
conditions?  If not,
we should drop flag_unsafe_math_optimizations from the expander and the insns.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]