‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, March 2, 2020 3:31 PM, Jakub Jelinek <ja...@redhat.com> wrote:

> 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.
>

Searching openmp.org located document "OpenMP API Examples". The relevant 
example
for inbranch/notinbranch shows very simple functions (SIMD.6.c). GCC testsuite
functions are similarly simple.
Wouldn't the same effect be achieved by letting GCC inline such functions and 
having
the loop autovectorizer handle the resulting code?


> 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//).
>

Sorry, I can't identify any test that ensures a masked vector function variant 
produces
expected results. I'll check again but I need more help here.

Bert.

Reply via email to