1// REQUIRES: clang-driver
2// REQUIRES: x86-registered-target
3// REQUIRES: amdgpu-registered-target
4
5// RUN: %clang -### -target amdgcn-amd-amdhsa \
6// RUN:   -mcpu=gfx908:xnack+:sramecc- \
7// RUN:   -nostdlib %s 2>&1 | FileCheck %s
8
9// RUN: %clang -### -target amdgcn-amd-amdhsa \
10// RUN:   -mcpu=gfx908:xnack+:sramecc- \
11// RUN:   -nostdlib -x ir %s 2>&1 | FileCheck %s
12
13// RUN: %clang -### -target amdgcn-amd-amdhsa \
14// RUN:   -mcpu=gfx908:xnack+:sramecc- \
15// RUN:   -nostdlib -x assembler %s 2>&1 | FileCheck %s
16
17// RUN: %clang -### -target amdgcn-amd-amdpal \
18// RUN:   -mcpu=gfx908:xnack+:sramecc- \
19// RUN:   -nostdlib %s 2>&1 | FileCheck %s
20
21// RUN: %clang -### -target amdgcn--mesa3d \
22// RUN:   -mcpu=gfx908:xnack+:sramecc- \
23// RUN:   -nostdlib %s 2>&1 | FileCheck %s
24
25// RUN: %clang -### -target amdgcn-amd-amdhsa \
26// RUN:   -nostdlib %s 2>&1 | FileCheck -check-prefix=NONE %s
27
28// CHECK: "-target-cpu" "gfx908"
29// CHECK-SAME: "-target-feature" "-sramecc"
30// CHECK-SAME: "-target-feature" "+xnack"
31
32// NONE-NOT: "-target-cpu"
33// NONE-NOT: "-target-feature"
34