Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / gomp / target-simd-clone-4.c
blob141097bdce8fd3c1dce0e1e6fb2363d964bf78a1
1 /* { dg-options "-fopenmp -O2" } */
2 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details" } */
4 /* Test that simd clones are not generated for functions with
5 "declare target" but that write memory in the body. */
7 extern int save;
9 #pragma omp declare target
10 __attribute__ ((__noinline__)) int addit(int a, int b)
12 save = a;
13 return a + b;
15 #pragma omp end declare target
17 void callit (int *a, int *b, int *c)
19 int i;
20 #pragma omp for simd
21 for (i = 0; i < 16; i++)
22 c[i] = addit (a[i], b[i]);
25 /* { dg-final { scan-ipa-dump "body includes memory write" "simdclone" { target x86_64-*-* } } } */
26 /* { dg-final { scan-ipa-dump-not "Generated .* clone" "simdclone" { target x86_64-*-* } } } */