1// REQUIRES: zlib, clang-driver, amdgpu-registered-target
2
3// RUN: %clang -### -target x86_64-unknown-linux-gnu -c \
4// RUN:   --offload-arch=gfx906:xnack+ %s -nogpulib -nogpuinc \
5// RUN:   --offload-arch=gfx900 \
6// RUN:   -ggdb -gsplit-dwarf 2>&1 | FileCheck %s
7
8// RUN: %clang -### -target x86_64-unknown-linux-gnu -c \
9// RUN:   -fgpu-rdc --offload-arch=gfx906:xnack+ %s -nogpulib -nogpuinc \
10// RUN:   --offload-arch=gfx900 \
11// RUN:   -ggdb -gsplit-dwarf 2>&1 | FileCheck %s
12
13// RUN: %clang -### -target x86_64-unknown-linux-gnu \
14// RUN:   --offload-arch=gfx906:xnack+ %s -nogpulib -nogpuinc \
15// RUN:   --offload-arch=gfx900 \
16// RUN:   -ggdb -gsplit-dwarf 2>&1 | FileCheck %s
17
18// RUN: %clang -### -target x86_64-unknown-linux-gnu \
19// RUN:   -fgpu-rdc --offload-arch=gfx906:xnack+ %s -nogpulib -nogpuinc \
20// RUN:   --offload-arch=gfx900 \
21// RUN:   -ggdb -gsplit-dwarf 2>&1 | FileCheck %s
22
23// CHECK-DAG: {{".*clang.*".* "-target-cpu" "gfx906".* "-split-dwarf-output" "hip-gsplit-dwarf-options_gfx906:xnack\+.dwo"}}
24// CHECK-DAG: {{".*clang.*".* "-target-cpu" "gfx900".* "-split-dwarf-output" "hip-gsplit-dwarf-options_gfx900.dwo"}}
25// CHECK-DAG: {{".*clang.*".* "-target-cpu" "x86-64".* "-split-dwarf-output" "hip-gsplit-dwarf-options.dwo"}}
26