‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Monday, March 2, 2020 4:59 PM, Jakub Jelinek <ja...@redhat.com> wrote:
> Indeed, there aren't any yet on the vectorizer side, I thought I've > implemented it > already in the vectorizer but apparently didn't, just the omp-simd-clone.c > part is > implemented (the more important part, as it matters for the ABI). What is in omp-simd-clone.c? What is missing from the vectorizer? My assumption was that the implementation of vector function masking was complete, but no test was created to verify the functionality. > A testcase could > be something along the lines of > #pragma omp declare simd > int foo (int, int); > > void > bar (int *a, int *b, int *c) > { > #pragma omp simd > for (int i = 0; i < 1024; i++) > { > int d = b[i], e = c[i], f; > if (b[i] < 20) > f = foo (d, e); > else > f = d + e; > } > } I thought the test would be more like: #pragma omp declare simd int foo (int *x, int *y) { *y = *x + 2; } void bar (int *a, float *b, float *c) { #pragma omp simd for (int i = 0; i < 1024; i++) { int d = b[i], e = c[i], f; if ( i % 2) f = foo (d, e); } } The point being that only items at odd indices are updated. That would require masking to avoid altering items at even indices. Bert.