
libgomp/ChangeLog: * testsuite/libgomp.c++/scan-10.C: Add option -fvect-cost-model=cheap. * testsuite/libgomp.c++/scan-11.C: Ditto. * testsuite/libgomp.c++/scan-12.C: Ditto. * testsuite/libgomp.c++/scan-13.C: Ditto. * testsuite/libgomp.c++/scan-14.C: Ditto. * testsuite/libgomp.c++/scan-15.C: Ditto. * testsuite/libgomp.c++/scan-16.C: Ditto. * testsuite/libgomp.c++/scan-9.C: Ditto. * testsuite/libgomp.c-c++-common/lastprivate-conditional-7.c: Ditto. * testsuite/libgomp.c-c++-common/lastprivate-conditional-8.c: Ditto. * testsuite/libgomp.c/scan-11.c: Ditto. * testsuite/libgomp.c/scan-12.c: Ditto. * testsuite/libgomp.c/scan-13.c: Ditto. * testsuite/libgomp.c/scan-14.c: Ditto. * testsuite/libgomp.c/scan-15.c: Ditto. * testsuite/libgomp.c/scan-16.c: Ditto. * testsuite/libgomp.c/scan-17.c: Ditto. * testsuite/libgomp.c/scan-18.c: Ditto. * testsuite/libgomp.c/scan-19.c: Ditto. * testsuite/libgomp.c/scan-20.c: Ditto. * testsuite/libgomp.c/scan-21.c: Ditto. * testsuite/libgomp.c/scan-22.c: Ditto. gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/pr94403.C: Add -fno-tree-vectorize * gcc.dg/optimize-bswapsi-5.c: Ditto. * gcc.dg/optimize-bswapsi-6.c: Ditto. * gcc.dg/Warray-bounds-51.c: Add additional option -mtune=generic for target x86/i?86 * gcc.dg/Wstringop-overflow-14.c: Ditto.
63 lines
1.3 KiB
C
63 lines
1.3 KiB
C
/* { dg-do run } */
|
|
/* { dg-additional-options "-O2 -fvect-cost-model=cheap -fdump-tree-vect-details" } */
|
|
/* { dg-additional-options "-mavx" { target avx_runtime } } */
|
|
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { target avx_runtime } } } */
|
|
|
|
int v, x;
|
|
|
|
__attribute__((noipa)) void
|
|
foo (int *a)
|
|
{
|
|
#pragma omp for simd lastprivate (conditional: x) schedule(simd: static)
|
|
for (int i = 0; i < 128; i++)
|
|
if (a[i])
|
|
x = a[i];
|
|
}
|
|
|
|
__attribute__((noipa)) void
|
|
bar (int *a, int *b)
|
|
{
|
|
#pragma omp for simd lastprivate (conditional: x, v) schedule(static, 16)
|
|
for (int i = 16; i < 128; ++i)
|
|
{
|
|
if (a[i])
|
|
x = a[i];
|
|
if (b[i])
|
|
v = b[i] + 10;
|
|
}
|
|
}
|
|
|
|
__attribute__((noipa)) void
|
|
baz (int *a)
|
|
{
|
|
#pragma omp for simd lastprivate (conditional: x) schedule(simd: dynamic, 16)
|
|
for (int i = 0; i < 128; i++)
|
|
if (a[i])
|
|
x = a[i] + 5;
|
|
}
|
|
|
|
int
|
|
main ()
|
|
{
|
|
int a[128], b[128], i;
|
|
for (i = 0; i < 128; i++)
|
|
{
|
|
a[i] = ((i % 11) == 2) ? i + 10 : 0;
|
|
asm volatile ("" : "+g" (i));
|
|
b[i] = ((i % 13) == 5) ? i * 2 : 0;
|
|
}
|
|
#pragma omp parallel
|
|
foo (a);
|
|
if (x != 133)
|
|
__builtin_abort ();
|
|
x = -3;
|
|
#pragma omp parallel
|
|
bar (b, a);
|
|
if (x != 244 || v != 143)
|
|
__builtin_abort ();
|
|
#pragma omp parallel
|
|
baz (b);
|
|
if (x != 249)
|
|
__builtin_abort ();
|
|
return 0;
|
|
}
|