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]: Expand round(a) = sgn(a) * floor(fabs(a) + 0.5) using SSE4 ROUND insn


On Sun, Aug 14, 2011 at 7:24 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

> We can use ROUNDSP/ROUNDSD in round(a) expansion. Currently, we expand
> round(a) as (-O2 -ffast-math):

I forgot to add that this expansion is expanded only under
flag_unsafe_math_optimizations due to addition of 0.5. For the input
of 0x1.fffffffffffffp-2, new insn sequence returns 1.0.

Uros.


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