1 // Test offload registration for two targets, and test offload target validation.
2 // RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=x86_64-pc-linux-gnu,powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s
3 // RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=aarch64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
4 // expected-no-diagnostics
11 // CHECK-DAG: [[ENTTY:%.+]] = type { ptr, ptr, i[[SZ:32|64]], i32, i32 }
13 // Check target registration is registered as a Ctor.
14 // CHECK: appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @.omp_offloading.requires_reg, ptr null }]
16 // Check presence of foo() and the outlined target region
17 // CHECK: define{{.*}} void [[FOO:@.+]]()
18 // CHECK: define internal void [[OUTLINEDTARGET:@.+]]()
20 // Check registration and unregistration code.
22 // CHECK: define internal void @.omp_offloading.requires_reg()
23 // CHECK: call void @__tgt_register_requires(i64 1)