1 // REQUIRES: amdgpu-registered-target
3 // RUN: %clang -S -o - --offload-arch=gfx906 --cuda-device-only -nogpuinc -nogpulib \
4 // RUN: %s 2>&1 | FileCheck --check-prefix=NOWGP %s
5 // RUN: %clang -S -o - --offload-arch=gfx906 --cuda-device-only -nogpuinc -nogpulib -mcumode \
6 // RUN: %s 2>&1 | FileCheck --check-prefix=NOWGP %s
7 // RUN: %clang -S -o - --offload-arch=gfx906 --cuda-device-only -nogpuinc -nogpulib -mno-cumode \
8 // RUN: %s 2>&1 | FileCheck --check-prefixes=NOWGP,WARN-CUMODE %s
9 // RUN: %clang -S -o - --offload-arch=gfx1030 --cuda-device-only -nogpuinc -nogpulib \
10 // RUN: %s 2>&1 | FileCheck --check-prefix=CUMODE-OFF %s
11 // RUN: %clang -S -o - --offload-arch=gfx1030 --cuda-device-only -nogpuinc -nogpulib -mcumode \
12 // RUN: %s 2>&1 | FileCheck --check-prefix=CUMODE-ON %s
13 // RUN: %clang -S -o - --offload-arch=gfx1030 --cuda-device-only -nogpuinc -nogpulib -mno-cumode \
14 // RUN: %s 2>&1 | FileCheck --check-prefix=CUMODE-OFF %s
15 // WARN-CUMODE: warning: ignoring '-mno-cumode' option as it is not currently supported for processor 'gfx906' [-Woption-ignored]
16 // NOWGP-NOT: .amdhsa_workgroup_processor_mode
17 // CUMODE-ON: .amdhsa_workgroup_processor_mode 0
18 // CUMODE-OFF: .amdhsa_workgroup_processor_mode 1
20 __attribute__((global)) void kernel() {}