From: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>
To: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] x86-64: Remove compiler -mavx512f check
Date: Tue, 24 Aug 2021 06:59:50 -0700 [thread overview]
Message-ID: <CAMe9rOpqCKWTKDYLtrKBCTR7QN5CKT1wrbK3FFk79A46zN+e2Q@mail.gmail.com> (raw)
In-Reply-To: <20210820135145.49237-1-hjl.tools@gmail.com>
On Fri, Aug 20, 2021 at 6:51 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> The minimum GCC requirement is GCC 6.2 which supports -mavx512f. Remove
> compiler -mavx512f check. Tested with GCC 6.4.1 on Linux/x86-64.
> ---
> config.h.in | 3 ---
> sysdeps/x86_64/Makefile | 2 --
> sysdeps/x86_64/configure | 26 --------------------------
> sysdeps/x86_64/configure.ac | 9 ---------
> sysdeps/x86_64/fpu/Makefile | 2 --
> 5 files changed, 42 deletions(-)
>
> diff --git a/config.h.in b/config.h.in
> index 0d92504f65..3752f9a6f7 100644
> --- a/config.h.in
> +++ b/config.h.in
> @@ -62,9 +62,6 @@
> /* Define if _rtld_local structure should be forced into .sdata section. */
> #undef HAVE_SDATA_SECTION
>
> -/* Define if compiler supports AVX512. */
> -#undef HAVE_AVX512_SUPPORT
> -
> /* Define if assembler supports AVX512DQ. */
> #undef HAVE_AVX512DQ_ASM_SUPPORT
>
> diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
> index 22c5b63ab5..7a4b576356 100644
> --- a/sysdeps/x86_64/Makefile
> +++ b/sysdeps/x86_64/Makefile
> @@ -134,14 +134,12 @@ CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
> CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
> CFLAGS-tst-avx-aux.c += $(AVX-CFLAGS)
> CFLAGS-tst-avxmod.c += $(AVX-CFLAGS)
> -ifeq (yes,$(config-cflags-avx512))
> AVX512-CFLAGS = -mavx512f
> CFLAGS-tst-audit10-aux.c += $(AVX512-CFLAGS)
> CFLAGS-tst-auditmod10a.c += $(AVX512-CFLAGS)
> CFLAGS-tst-auditmod10b.c += $(AVX512-CFLAGS)
> CFLAGS-tst-avx512-aux.c += $(AVX512-CFLAGS)
> CFLAGS-tst-avx512mod.c += $(AVX512-CFLAGS)
> -endif
>
> $(objpfx)tst-glibc-hwcaps: $(objpfx)libmarkermod2-1.so \
> $(objpfx)libmarkermod3-1.so $(objpfx)libmarkermod4-1.so
> diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
> index 75c96d60d4..d81accdc07 100755
> --- a/sysdeps/x86_64/configure
> +++ b/sysdeps/x86_64/configure
> @@ -28,32 +28,6 @@ if test $libc_cv_asm_avx512dq = yes; then
>
> fi
>
> -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX512 support" >&5
> -$as_echo_n "checking for AVX512 support... " >&6; }
> -if ${libc_cv_cc_avx512+:} false; then :
> - $as_echo_n "(cached) " >&6
> -else
> - if { ac_try='${CC-cc} -mavx512f -xc /dev/null -S -o /dev/null'
> - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
> - (eval $ac_try) 2>&5
> - ac_status=$?
> - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
> - test $ac_status = 0; }; }; then :
> - libc_cv_cc_avx512=$libc_cv_asm_avx512dq
> -else
> - libc_cv_cc_avx512=no
> -fi
> -
> -fi
> -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx512" >&5
> -$as_echo "$libc_cv_cc_avx512" >&6; }
> -if test $libc_cv_cc_avx512 = yes; then
> - $as_echo "#define HAVE_AVX512_SUPPORT 1" >>confdefs.h
> -
> -fi
> -config_vars="$config_vars
> -config-cflags-avx512 = $libc_cv_cc_avx512"
> -
> { $as_echo "$as_me:${as_lineno-$LINENO}: checking -mprefer-vector-width=128" >&5
> $as_echo_n "checking -mprefer-vector-width=128... " >&6; }
> if ${libc_cv_cc_mprefer_vector_width+:} false; then :
> diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
> index 66219e7ce5..41baed6999 100644
> --- a/sysdeps/x86_64/configure.ac
> +++ b/sysdeps/x86_64/configure.ac
> @@ -16,15 +16,6 @@ if test $libc_cv_asm_avx512dq = yes; then
> AC_DEFINE(HAVE_AVX512DQ_ASM_SUPPORT)
> fi
>
> -dnl Check if -mavx512f works.
> -AC_CACHE_CHECK(for AVX512 support, libc_cv_cc_avx512, [dnl
> -LIBC_TRY_CC_OPTION([-mavx512f], [libc_cv_cc_avx512=$libc_cv_asm_avx512dq], [libc_cv_cc_avx512=no])
> -])
> -if test $libc_cv_cc_avx512 = yes; then
> - AC_DEFINE(HAVE_AVX512_SUPPORT)
> -fi
> -LIBC_CONFIG_VAR([config-cflags-avx512], [$libc_cv_cc_avx512])
> -
> dnl Check if -mprefer-vector-width=128 works.
> AC_CACHE_CHECK(-mprefer-vector-width=128, libc_cv_cc_mprefer_vector_width, [dnl
> LIBC_TRY_CC_OPTION([-mprefer-vector-width=128],
> diff --git a/sysdeps/x86_64/fpu/Makefile b/sysdeps/x86_64/fpu/Makefile
> index 9a4bdd075c..1b4406380d 100644
> --- a/sysdeps/x86_64/fpu/Makefile
> +++ b/sysdeps/x86_64/fpu/Makefile
> @@ -68,7 +68,6 @@ $(objpfx)test-float-libmvec-sincosf-avx2: \
> $(objpfx)test-float-libmvec-sincosf-avx2.o \
> $(objpfx)test-float-libmvec-sincosf-avx2-main.o $(libmvec)
>
> -ifeq (yes,$(config-cflags-avx512))
> libmvec-tests += double-vlen8 float-vlen16
> tests += test-double-libmvec-sincos-avx512 \
> test-float-libmvec-sincosf-avx512
> @@ -84,7 +83,6 @@ $(objpfx)test-double-libmvec-sincos-avx512: \
> $(objpfx)test-float-libmvec-sincosf-avx512: \
> $(objpfx)test-float-libmvec-sincosf-avx512.o \
> $(objpfx)test-float-libmvec-sincosf-avx512-main.o $(libmvec)
> -endif
>
> double-vlen2-funcs = cos exp log pow sin sincos
> double-vlen4-funcs = cos exp log pow sin sincos
> --
> 2.31.1
>
I am checking in this patch.
--
H.J.
prev parent reply other threads:[~2021-08-24 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-20 13:51 [PATCH] x86-64: Remove compiler -mavx512f check H.J. Lu via Libc-alpha
2021-08-24 13:59 ` H.J. Lu via Libc-alpha [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMe9rOpqCKWTKDYLtrKBCTR7QN5CKT1wrbK3FFk79A46zN+e2Q@mail.gmail.com \
--to=libc-alpha@sourceware.org \
--cc=hjl.tools@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).