This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] x86-64: Add sinf with FMA
On 05/12/2017 11:57, Joseph Myers wrote:
> On Tue, 5 Dec 2017, Adhemerval Zanella wrote:
>> + res = __builtin_floor (d);
>> return res;
>> As least for GCC7 compiler will expand to an inline version even for generic
>> tune option. However the code that actually calls __floor is not showing on
> Which, as per discussions on gcc-patches in August, may not be a good idea
> with current GCC, because it means that your code built for generic SSE2
> is now slower on an SSE4.1 processor than it would have been if it had
> called the __floor IFUNC. (That issue could be avoided by adding an
> SSE4.1 IFUNC of sinf, of course. I think we should aim to use floor etc.
> directly anyway - in cases where we can't avoid floor and just convert
> directly to integer - and address any such pessimizations in GCC rather
> than working around them in glibc.)
Which indeed seems to be the case here as well (although the difference is
quite small, but still noticeable). With latest H.J. Lu changes to remove
floor it seems the small change to use double for sign operation also does
not yield much change.