]> git.ipfire.org Git - thirdparty/gcc.git/commit
amdgcn: Enable SIMD vectorization of math functions
authorKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 1 Nov 2022 22:50:30 +0000 (22:50 +0000)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Wed, 2 Nov 2022 00:34:52 +0000 (00:34 +0000)
commit863579c4e301224b33c14821506894ac44d50def
treec41050342d26b60f581d971e3a8cd9611ec9759c
parentbd9a6106b95907fb76a410e293401443a45b76f2
amdgcn: Enable SIMD vectorization of math functions

Calls to vectorized versions of routines in the math library will now
be inserted when vectorizing code containing supported math functions.

2022-11-01  Kwok Cheung Yeung  <kcy@codesourcery.com>
    Paul-Antoine Arras  <pa@codesourcery.com>

gcc/
* builtins.cc (mathfn_built_in_explicit): New.
* config/gcn/gcn.cc: Include case-cfn-macros.h.
(mathfn_built_in_explicit): Add prototype.
(gcn_vectorize_builtin_vectorized_function): New.
(gcn_libc_has_function): New.
(TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION): Define.
(TARGET_LIBC_HAS_FUNCTION): Define.

gcc/testsuite/
* gcc.target/gcn/simd-math-1.c: New testcase.

libgomp/
* testsuite/libgomp.c/simd-math-1.c: New testcase.
gcc/ChangeLog.omp
gcc/builtins.cc
gcc/config/gcn/gcn.cc
gcc/testsuite/ChangeLog.omp
gcc/testsuite/gcc.target/gcn/simd-math-1.c [new file with mode: 0644]
libgomp/ChangeLog.omp
libgomp/testsuite/libgomp.c/simd-math-1.c [new file with mode: 0644]