2020-05-05 11:22:06 +08:00
|
|
|
// REQUIRES: clang-driver
|
|
|
|
// REQUIRES: x86-registered-target
|
|
|
|
// REQUIRES: amdgpu-registered-target
|
|
|
|
|
|
|
|
// RUN: %clang -E -dM -target amdgcn-amd-amdhsa \
|
2020-12-08 06:31:28 +08:00
|
|
|
// RUN: -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: | FileCheck -check-prefixes=PROC,ID1 %s
|
|
|
|
|
|
|
|
// RUN: %clang -E -dM -target amdgcn-amd-amdpal \
|
2020-12-08 06:31:28 +08:00
|
|
|
// RUN: -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: | FileCheck -check-prefixes=PROC,ID1 %s
|
|
|
|
|
|
|
|
// RUN: %clang -E -dM -target amdgcn--mesa3d \
|
2020-12-08 06:31:28 +08:00
|
|
|
// RUN: -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: | FileCheck -check-prefixes=PROC,ID1 %s
|
|
|
|
|
|
|
|
// RUN: %clang -E -dM -target amdgcn-amd-amdhsa \
|
|
|
|
// RUN: -mcpu=gfx908 -nogpulib -o - %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefixes=PROC,ID2 %s
|
|
|
|
|
|
|
|
// RUN: %clang -E -dM -target amdgcn-amd-amdhsa \
|
|
|
|
// RUN: -nogpulib -o - %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefixes=NONE %s
|
|
|
|
|
|
|
|
// PROC-DAG: #define __amdgcn_processor__ "gfx908"
|
|
|
|
|
|
|
|
// ID1-DAG: #define __amdgcn_feature_xnack__ 1
|
2020-12-08 06:31:28 +08:00
|
|
|
// ID1-DAG: #define __amdgcn_feature_sramecc__ 0
|
|
|
|
// ID1-DAG: #define __amdgcn_target_id__ "gfx908:sramecc-:xnack+"
|
2020-05-05 11:22:06 +08:00
|
|
|
|
|
|
|
// ID2-DAG: #define __amdgcn_target_id__ "gfx908"
|
|
|
|
// ID2-NOT: #define __amdgcn_feature_xnack__
|
2020-12-08 06:31:28 +08:00
|
|
|
// ID2-NOT: #define __amdgcn_feature_sramecc__
|
2020-05-05 11:22:06 +08:00
|
|
|
|
|
|
|
// NONE-NOT: #define __amdgcn_processor__
|
|
|
|
// NONE-NOT: #define __amdgcn_feature_xnack__
|
2020-12-08 06:31:28 +08:00
|
|
|
// NONE-NOT: #define __amdgcn_feature_sramecc__
|
2020-05-05 11:22:06 +08:00
|
|
|
// NONE-NOT: #define __amdgcn_target_id__
|