Debian Codegraph @

gcc/testsuite/gcc.dg/gomp/target-simd-clone-3.c

raw
1 /* { dg-options "-fopenmp -O2" } */
2 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details" } */
3
4 /* Test that host simd clones are not generated for functions with the nohost
5 "declare target" clause. */
6
7 __attribute__ ((__noinline__)) int addit (int a, int b)
8 {
9 return a + b;
10 }
11 #pragma omp declare target to(addit) device_type(nohost)
12
13 void callit (int *a, int *b, int *c)
14 {
15 int i;
16 #pragma omp for simd
17 for (i = 0; i < 16; i++)
18 c[i] = addit (a[i], b[i]);
19 }
20
21 /* { dg-final { scan-ipa-dump "device doesn't match" "simdclone" { target x86_64-*-* } } } */
22 /* { dg-final { scan-ipa-dump-not "Generated .* clone" "simdclone" { target x86_64-*-* } } } */