Skip to content

Commit 89d7197

Browse files
committed
[AMDGPU] Extend hip-toolchin-features.hip test
- Extend hip-toolchin-features.hip to also check the lld attributes are passed correctly. - Add check for cumode attributes. Differential Revision: https://reviews.llvm.org/D89636
1 parent ceb9940 commit 89d7197

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

clang/test/Driver/hip-toolchain-features.hip

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
// XNACK: {{.*}}clang{{.*}}"-target-feature" "+xnack"
1313
// NOXNACK: {{.*}}clang{{.*}}"-target-feature" "-xnack"
14+
// XNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+xnack"
15+
// NOXNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-xnack"
1416

1517
// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
1618
// RUN: --cuda-gpu-arch=gfx908:sram-ecc+ %s \
@@ -21,6 +23,20 @@
2123

2224
// SRAM: {{.*}}clang{{.*}}"-target-feature" "+sram-ecc"
2325
// NOSRAM: {{.*}}clang{{.*}}"-target-feature" "-sram-ecc"
26+
// SRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+sram-ecc"
27+
// NOTSRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-sram-ecc"
28+
29+
// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
30+
// RUN: --cuda-gpu-arch=gfx1010 %s \
31+
// RUN: -mcumode 2>&1 | FileCheck %s -check-prefix=CUMODE
32+
// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
33+
// RUN: --cuda-gpu-arch=gfx1010 %s \
34+
// RUN: -mno-cumode 2>&1 | FileCheck %s -check-prefix=NOTCUMODE
35+
36+
// CUMODE: {{.*}}clang{{.*}}"-target-feature" "+cumode"
37+
// NOTCUMODE: {{.*}}clang{{.*}}"-target-feature" "-cumode"
38+
// CUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+cumode"
39+
// NOTCUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-cumode"
2440

2541
// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
2642
// RUN: --cuda-gpu-arch=gfx908:xnack+:sram-ecc+ %s \

0 commit comments

Comments
 (0)