|
| 1 | +// REQUIRES: clang-driver |
| 2 | +// REQUIRES: x86-registered-target |
| 3 | +// REQUIRES: amdgpu-registered-target |
| 4 | + |
| 5 | +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ |
| 6 | +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ |
| 7 | +// RUN: -mcode-object-v3 2>&1 | FileCheck %s -check-prefix=COV3 |
| 8 | +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ |
| 9 | +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ |
| 10 | +// RUN: -mno-code-object-v3 2>&1 | FileCheck %s -check-prefix=NOCOV3 |
| 11 | + |
| 12 | +// COV3: {{.*}}clang{{.*}}"-target-feature" "+code-object-v3" |
| 13 | +// NOCOV3: {{.*}}clang{{.*}}"-target-feature" "-code-object-v3" |
| 14 | + |
| 15 | + |
| 16 | +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ |
| 17 | +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ |
| 18 | +// RUN: -mxnack 2>&1 | FileCheck %s -check-prefix=XNACK |
| 19 | +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ |
| 20 | +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ |
| 21 | +// RUN: -mno-xnack 2>&1 | FileCheck %s -check-prefix=NOXNACK |
| 22 | + |
| 23 | +// XNACK: {{.*}}clang{{.*}}"-target-feature" "+xnack" |
| 24 | +// NOXNACK: {{.*}}clang{{.*}}"-target-feature" "-xnack" |
| 25 | + |
| 26 | + |
| 27 | +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ |
| 28 | +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ |
| 29 | +// RUN: -msram-ecc 2>&1 | FileCheck %s -check-prefix=SRAM |
| 30 | +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ |
| 31 | +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ |
| 32 | +// RUN: -mno-sram-ecc 2>&1 | FileCheck %s -check-prefix=NOSRAM |
| 33 | + |
| 34 | +// SRAM: {{.*}}clang{{.*}}"-target-feature" "+sram-ecc" |
| 35 | +// NOSRAM: {{.*}}clang{{.*}}"-target-feature" "-sram-ecc" |
| 36 | + |
| 37 | + |
| 38 | +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ |
| 39 | +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ |
| 40 | +// RUN: -mcode-object-v3 -mxnack -msram-ecc \ |
| 41 | +// RUN: 2>&1 | FileCheck %s -check-prefix=ALL3 |
| 42 | +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ |
| 43 | +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ |
| 44 | +// RUN: -mno-code-object-v3 -mno-xnack -mno-sram-ecc \ |
| 45 | +// RUN: 2>&1 | FileCheck %s -check-prefix=NOALL3 |
| 46 | + |
| 47 | +// ALL3: {{.*}}clang{{.*}}"-target-feature" "+code-object-v3" "-target-feature" "+xnack" "-target-feature" "+sram-ecc" |
| 48 | +// NOALL3: {{.*}}clang{{.*}}"-target-feature" "-code-object-v3" "-target-feature" "-xnack" "-target-feature" "-sram-ecc" |
0 commit comments