1 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-linux -emit-llvm %s -fexceptions -fcxx-exceptions -o - -fsanitize-address-use-after-scope | FileCheck %s
2 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple aarch64-unknown-linux -emit-llvm %s -fexceptions -fcxx-exceptions -o - -fsanitize-address-use-after-scope | FileCheck %s
3 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple ppc64le-unknown-linux -emit-llvm %s -fexceptions -fcxx-exceptions -o - -fsanitize-address-use-after-scope | 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
++)
40 // CHECK-LABEL: void @_Z3foov()
41 // CHECK: @__kmpc_fork_call(ptr {{.+}}, i32 0, ptr [[OUTLINED_2:@.+]])
42 // CHECK: @__kmpc_fork_call(ptr {{.+}}, i32 0, ptr [[OUTLINED_3:@.+]])
43 // CHECK: @__kmpc_fork_call(ptr {{.+}}, i32 0, ptr [[OUTLINED_4:@.+]])
44 // CHECK: @__kmpc_fork_call(ptr {{.+}}, i32 0, ptr [[OUTLINED_5:@.+]])
45 // CHECK: @__kmpc_fork_call(ptr {{.+}}, i32 0, ptr [[OUTLINED_6:@.+]])
46 // CHECK: @__kmpc_fork_call(ptr {{.+}}, i32 0, ptr [[OUTLINED_7:@.+]])
49 // CHECK: define internal void [[OUTLINED_2]](
53 // CHECK: define internal void [[OUTLINED_3]](
57 // CHECK: define internal void [[OUTLINED_4]](
61 // CHECK: define internal void [[OUTLINED_5]](
62 // NO-CHECK: call void @__kmpc_for_static_init
63 // NO-CHECK: call void @__kmpc_for_static_fini
66 // CHECK: define internal void [[OUTLINED_6]](
67 // CHECK: call void @__kmpc_for_static_init
68 // CHECK: call void @__kmpc_for_static_fini
71 // CHECK: define internal void [[OUTLINED_7]](
72 // NO-CHECK: call void @__kmpc_for_static_init
73 // NO-CHECK: call void @__kmpc_for_static_fini