From 89d71970cb82b6f56fb64a0e711df4a59da15d42 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 17 Oct 2020 22:38:04 +0000 Subject: [PATCH] [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 --- clang/test/Driver/hip-toolchain-features.hip | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/clang/test/Driver/hip-toolchain-features.hip b/clang/test/Driver/hip-toolchain-features.hip index 38b94f9..d6617ef 100644 --- a/clang/test/Driver/hip-toolchain-features.hip +++ b/clang/test/Driver/hip-toolchain-features.hip @@ -11,6 +11,8 @@ // XNACK: {{.*}}clang{{.*}}"-target-feature" "+xnack" // NOXNACK: {{.*}}clang{{.*}}"-target-feature" "-xnack" +// XNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+xnack" +// NOXNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-xnack" // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx908:sram-ecc+ %s \ @@ -21,6 +23,20 @@ // SRAM: {{.*}}clang{{.*}}"-target-feature" "+sram-ecc" // NOSRAM: {{.*}}clang{{.*}}"-target-feature" "-sram-ecc" +// SRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+sram-ecc" +// NOTSRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-sram-ecc" + +// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: --cuda-gpu-arch=gfx1010 %s \ +// RUN: -mcumode 2>&1 | FileCheck %s -check-prefix=CUMODE +// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: --cuda-gpu-arch=gfx1010 %s \ +// RUN: -mno-cumode 2>&1 | FileCheck %s -check-prefix=NOTCUMODE + +// CUMODE: {{.*}}clang{{.*}}"-target-feature" "+cumode" +// NOTCUMODE: {{.*}}clang{{.*}}"-target-feature" "-cumode" +// CUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+cumode" +// NOTCUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-cumode" // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx908:xnack+:sram-ecc+ %s \ -- 2.7.4