On Mon, Mar 02, 2020 at 08:20:01PM +0000, GT wrote: > Which raises the question: what use-case motivated allowing the compiler > to auto-vectorize user defined functions? From having manually created vector
The feature made it into the OpenMP standard (already OpenMP 4.0) and so got implemented as part of the OpenMP 4.0 implementation. > versions of sin, cos and other libmvec functions, I'm wondering how GCC is > able to > autovectorize a non-trivial user defined function. There are various tests that cover it, look e.g. at tests that require vect_simd_clones effective target (e.g. in gcc/testsuite/*/{vect,gomp}/ and libgomp/testsuite/*/). In the OpenMP standard, see e.g. https://www.openmp.org/spec-html/5.0/openmpsu42.html#x65-1390002.9.3 Jakub