| 1 |
// RUN: %clang -E -dM -target amdgcn-amd-amdhsa \ |
| 2 |
// RUN: -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \ |
| 3 |
// RUN: | FileCheck -check-prefixes=PROC,ID1 %s |
| 4 |
|
| 5 |
// RUN: %clang -E -dM -target amdgcn-amd-amdpal \ |
| 6 |
// RUN: -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \ |
| 7 |
// RUN: | FileCheck -check-prefixes=PROC,ID1 %s |
| 8 |
|
| 9 |
// RUN: %clang -E -dM -target amdgcn--mesa3d \ |
| 10 |
// RUN: -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \ |
| 11 |
// RUN: | FileCheck -check-prefixes=PROC,ID1 %s |
| 12 |
|
| 13 |
// RUN: %clang -E -dM -target amdgcn-amd-amdhsa \ |
| 14 |
// RUN: -mcpu=gfx908 -nogpulib -o - %s 2>&1 \ |
| 15 |
// RUN: | FileCheck -check-prefixes=PROC,ID2 %s |
| 16 |
|
| 17 |
// RUN: %clang -E -dM -target amdgcn-amd-amdhsa \ |
| 18 |
// RUN: -nogpulib -o - %s 2>&1 \ |
| 19 |
// RUN: | FileCheck -check-prefixes=NONE %s |
| 20 |
|
| 21 |
// PROC-DAG: #define __amdgcn_processor__ "gfx908" |
| 22 |
|
| 23 |
// ID1-DAG: #define __amdgcn_feature_xnack__ 1 |
| 24 |
// ID1-DAG: #define __amdgcn_feature_sramecc__ 0 |
| 25 |
// ID1-DAG: #define __amdgcn_target_id__ "gfx908:sramecc-:xnack+" |
| 26 |
|
| 27 |
// ID2-DAG: #define __amdgcn_target_id__ "gfx908" |
| 28 |
// ID2-NOT: #define __amdgcn_feature_xnack__ |
| 29 |
// ID2-NOT: #define __amdgcn_feature_sramecc__ |
| 30 |
|
| 31 |
// NONE-NOT: #define __amdgcn_processor__ |
| 32 |
// NONE-NOT: #define __amdgcn_feature_xnack__ |
| 33 |
// NONE-NOT: #define __amdgcn_feature_sramecc__ |
| 34 |
// NONE-NOT: #define __amdgcn_target_id__ |