This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] aarch64: Implement math acceleration via builtins
On 16/10/2017 07:36, Szabolcs Nagy wrote:
> On 13/10/17 23:36, Adhemerval Zanella wrote:
>> On 13/10/2017 18:26, Michael Collison wrote:
>>> +long long int
>>> +__llrint (double x)
>>> +{
>>> + double r = __builtin_rint (x);
>>> +
>>> + // Prevent gcc from calling lrint directly when compiled with -fno-math-errno
>>> + // by inserting a barrier
>>> +
>>> + math_opt_barrier (r);
>>
>> I am not seeing any difference on code generation with or without the
>> math barrier when using GCC 4.9, GCC7 or GCC mainline with or without
>> -fno-math-errno (I am seeing just a combination of frintx plus fcvtzs).
>> Do we really need this barrier here?
>>
>
> https://godbolt.org/g/zgvReU
>
> if gcc can do this transformation then we
> better put a barrier there.
Right, it seems that indeed GCC 5 and GCC 6 does this transformation.