1 // RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux -emit-llvm %s -o - | FileCheck %s
2 // RUN: %clang_cc1 -verify -fopenmp -x c -triple aarch64-unknown-linux -emit-llvm %s -o - | FileCheck %s
3 // RUN: %clang_cc1 -verify -fopenmp -x c -triple ppc64le-unknown-linux -emit-llvm %s -o - | FileCheck %s
4 // expected-no-diagnostics
12 #pragma omp metadirective when(implementation = {vendor(score(0) \
14 device = {kind(cpu)} \
15 : parallel) default(target teams)
17 #pragma omp metadirective when(device = {kind(gpu)} \
18 : target teams) when(implementation = {vendor(llvm)} \
21 #pragma omp metadirective default(target) when(implementation = {vendor(score(5) \
23 device = {kind(cpu, host)} \
26 #pragma omp metadirective when(implementation = {extension(match_all)} \
27 : parallel) default(parallel for)
28 for (int i
= 0; i
< 100; i
++)
30 #pragma omp metadirective when(implementation = {extension(match_any)} \
31 : parallel) default(parallel for)
32 for (int i
= 0; i
< 100; i
++)
34 #pragma omp metadirective when(implementation = {extension(match_none)} \
35 : parallel) default(parallel for)
36 for (int i
= 0; i
< 100; i
++)
41 // CHECK-COUNT-6: ...) @__kmpc_fork_call(
44 // CHECK: define internal void @foo.omp_outlined(
48 // CHECK: define internal void @foo.omp_outlined.1(
52 // CHECK: define internal void @foo.omp_outlined.2(
56 // CHECK: define internal void @foo.omp_outlined.3(
57 // NO-CHECK: call void @__kmpc_for_static_init
58 // NO-CHECK: call void @__kmpc_for_static_fini
61 // CHECK: define internal void @foo.omp_outlined.4(
62 // CHECK: call void @__kmpc_for_static_init
63 // CHECK: call void @__kmpc_for_static_fini
66 // CHECK: define internal void @foo.omp_outlined.5(
67 // NO-CHECK: call void @__kmpc_for_static_init
68 // NO-CHECK: call void @__kmpc_for_static_fini