
Reland https://github.com/llvm/llvm-project/pull/121839 based on the results of the Discourse discussion [here](https://discourse.llvm.org/t/rfc-has-builtin-behavior-on-offloading-targets/84964). --------- Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
19 lines
727 B
C++
19 lines
727 B
C++
// RUN: %clang_cc1 -fopenmp -triple=spirv64 -fopenmp-is-target-device \
|
|
// RUN: -aux-triple x86_64-linux-unknown -E %s | FileCheck -implicit-check-not=BAD %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp -triple=nvptx64 -fopenmp-is-target-device \
|
|
// RUN: -aux-triple x86_64-linux-unknown -E %s | FileCheck -implicit-check-not=BAD %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp -triple=amdgcn-amd-amdhsa -fopenmp-is-target-device \
|
|
// RUN: -aux-triple x86_64-linux-unknown -E %s | FileCheck -implicit-check-not=BAD %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp -triple=aarch64 -fopenmp-is-target-device \
|
|
// RUN: -aux-triple x86_64-linux-unknown -E %s | FileCheck -implicit-check-not=BAD %s
|
|
|
|
// CHECK: GOOD
|
|
#if __has_builtin(__builtin_ia32_pause)
|
|
BAD
|
|
#else
|
|
GOOD
|
|
#endif
|