[PATCH v2] x86-64: Disable libmvec ABI test for Clang
Sam James
sam@gentoo.org
Fri Dec 20 03:30:39 GMT 2024
"H.J. Lu" <hjl.tools@gmail.com> writes:
> Unlike GCC, libmvec support in Clang is hard-coded. Clang doesn't use
> macros defined in <bits/libm-simd-decl-stubs.h> to support new libmvec
> functions added to glibc. Also since Clang can't vectorize some test
> loops to test libmvec ABI:
>
> In file included from ../sysdeps/x86_64/fpu/test-double-libmvec-asin.c:3:
> ../sysdeps/x86_64/fpu/test-vector-abi-arg1.h:38:1: error: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Werror,-Wpass-failed=transform-warning]
> 38 | #pragma omp simd
> | ^
> 1 error generated.
>
> disable libmvec ABI test for Clang.
This seems fine, OK if Joseph doesn't object. (I'd argue this is of a
different class of problem to the hang we saw, but he may want it
reported.)
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> ---
> sysdeps/x86_64/fpu/Makefile | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/sysdeps/x86_64/fpu/Makefile b/sysdeps/x86_64/fpu/Makefile
> index 8eb382a177..e39d31c117 100644
> --- a/sysdeps/x86_64/fpu/Makefile
> +++ b/sysdeps/x86_64/fpu/Makefile
> @@ -28,6 +28,8 @@ endif
> ifneq ($(multi-arch),no)
> # Variables for libmvec tests.
> ifeq ($(subdir)$(build-mathvec),mathyes)
> +ifneq ($(have-test-clang),yes)
> +# NB: Clang 19 can't vectorize the test loop to test libmvec ABI.
> libmvec-tests += double-vlen2 double-vlen4 double-vlen4-avx2 \
> float-vlen4 float-vlen8 float-vlen8-avx2 \
> double-vlen8 float-vlen16
> @@ -36,6 +38,7 @@ tests += \
> $(libmvec-abi-func-avx-tests) \
> $(libmvec-abi-func-avx2-tests) \
> $(libmvec-abi-func-avx512f-tests)
> +endif
>
> double-vlen2-funcs = $(libmvec-funcs)
> double-vlen4-funcs = $(libmvec-funcs)
More information about the Libc-alpha
mailing list