[PATCH] BZ #14649: Add multiarch FMA support to x86-64 libm

Andreas Jaeger aj@suse.com
Tue Oct 2 07:03:00 GMT 2012


On 10/01/2012 08:49 PM, H.J. Lu wrote:
> On Mon, Oct 1, 2012 at 10:56 AM, Andreas Jaeger <aj@suse.com> wrote:
>> On 10/01/2012 05:14 PM, H.J. Lu wrote:
>>>
>>> Hi,
>>>
>>> This patch adds multiarch FMA support to x86-64 libm.  Tested on
>>> FMA machine.  OK for master?
>>
>>
>> What kind of performance benefits does it bring us? Are you sure that all
>
> I don't have any performance numbers.  My patch just
> enables FMA optimization, similar to FMA4 optimization.

Could you test at least one of these functions to see whether it makes a 
difference at all, please?

>> the functions you enhance are really using fma and thus benefit from the
>> change?
>
> Not all FMA/FMA4 functions have FMA/FMA4 instructions.  We should
> take a look and use AVX functions instead.

So, let's only add those functions that really benefit from this.

>> Btw. are there any processors that have both fma variants in hardware - or
>> is it at most one of them?
>>
>
> I think some AMD processors support both FMA and FMA4.  But Intel
> processors only support FMA.   My patch follows s_fma.c which prefers
> FMA over FMA4.

Hope that's the right thing ;)

Andreas
-- 
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
   SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126



More information about the Libc-alpha mailing list