1 /* { dg-do link { target { offload_target_amdgcn } } } */
2 /* { dg-additional-options "-O2 -foffload-options=-fdump-ipa-simdclone-details" } */
4 /* Test that device simd clones are not generated for functions with the host
5 "declare target" clause only. */
7 __attribute__ ((__noinline__
)) int addit (int a
, int b
)
11 #pragma omp declare target to(addit) device_type(host)
13 #pragma omp declare target
14 void callit (int *a
, int *b
, int *c
)
18 for (i
= 0; i
< 16; i
++)
19 c
[i
] = addit (a
[i
], b
[i
]);
21 #pragma omp end declare target
25 int aa
[16], bb
[16], cc
[16];
27 for (i
= 0; i
< 16; i
++)
33 for (i
= 0; i
< 16; i
++)
39 /* { dg-final { scan-offload-ipa-dump "device doesn't match" "simdclone" { target x86_64-*-* } } } */
40 /* { dg-final { scan-offload-ipa-dump-not "Generated .* clone" "simdclone" { target x86_64-*-* } } } */