This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] Compile AVX libm functions with -mavx


On Tue, Oct 2, 2012 at 12:02 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Tuesday 02 October 2012 09:53:25 H.J. Lu wrote:
>> This patch compiles AVX libm functions with -mavx.  It reduces text size
>> of libm.so by about 1%:
>
> looks like you're reverting 56f6f6a2403cfa7267cad722597113be35ecf70d.
> shouldn't you revert all of it and not just change the CFLAGS back ?

Doesn't this patch:

http://sourceware.org/ml/libc-alpha/2012-10/msg00055.html

do that?

> it'd be useful to know *why* Ulrich moved away from -mavx, but unfortunately
> his commit message is useless.
> -mike

I can only guess:

diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2.c
b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
index 3a615fc..6867c6e 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_atan2.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
@@ -14,7 +14,7 @@ extern double __ieee754_atan2_fma4 (double, double);

 libm_ifunc (__ieee754_atan2,
       HAS_FMA4 ? __ieee754_atan2_fma4
-      : (HAS_YMM_USABLE ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
+      : (HAS_AVX ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
 strong_alias (__ieee754_atan2, __atan2_finite)

 # define __ieee754_atan2 __ieee754_atan2_sse2

is the motivation.  That is you don't need YMM state support to enable AVX.
But that is no longer true after

commit 1a0994f5356214e8af8a1c1cc33fbf74a7ac8993
Author: Carlos O'Donell <carlos_odonell@mentor.com>
Date:   Wed May 16 20:14:24 2012 -0700

    BZ#14059: Fix AVX and FMA4 detection.

    Fix AVX and FMA4 detection by following the guidelines
    set out by Intel and AMD for detecting these features.

Now HAS_AVX means YMM state support.


-- 
H.J.


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