blob: 8c938c7f4bf1701b4dedd92fe08e40bb7f948506 [file] [log] [blame]
Yaxun (Sam) Liu2cd75f72020-09-29 20:23:03 -04001// REQUIRES: clang-driver
2// REQUIRES: x86-registered-target
3// REQUIRES: amdgpu-registered-target
4
5// RUN: not %clang -target amdgcn-amd-amdhsa \
6// RUN: -mcpu=gfx908xnack -nostdlib \
7// RUN: %s 2>&1 | FileCheck -check-prefix=NOPLUS %s
8
Aaron Ballman530ea282021-08-05 07:04:03 -04009// NOPLUS: error: invalid target ID 'gfx908xnack'
Yaxun (Sam) Liu2cd75f72020-09-29 20:23:03 -040010
11// RUN: not %clang -target amdgcn-amd-amdpal \
12// RUN: -mcpu=gfx908:xnack+:xnack+ -nostdlib \
13// RUN: %s 2>&1 | FileCheck -check-prefix=ORDER %s
14
Aaron Ballman530ea282021-08-05 07:04:03 -040015// ORDER: error: invalid target ID 'gfx908:xnack+:xnack+'
Yaxun (Sam) Liu2cd75f72020-09-29 20:23:03 -040016
17// RUN: not %clang -target amdgcn--mesa3d \
18// RUN: -mcpu=gfx908:unknown+ -nostdlib \
19// RUN: %s 2>&1 | FileCheck -check-prefix=UNK %s
20
Aaron Ballman530ea282021-08-05 07:04:03 -040021// UNK: error: invalid target ID 'gfx908:unknown+'
Yaxun (Sam) Liu2cd75f72020-09-29 20:23:03 -040022
23// RUN: not %clang -target amdgcn-amd-amdhsa \
24// RUN: -mcpu=gfx908:sram-ecc+:unknown+ -nostdlib \
25// RUN: %s 2>&1 | FileCheck -check-prefix=MIXED %s
26
Aaron Ballman530ea282021-08-05 07:04:03 -040027// MIXED: error: invalid target ID 'gfx908:sram-ecc+:unknown+'
Yaxun (Sam) Liu2cd75f72020-09-29 20:23:03 -040028
29// RUN: not %clang -target amdgcn-amd-amdhsa \
30// RUN: -mcpu=gfx900:sram-ecc+ -nostdlib \
31// RUN: %s 2>&1 | FileCheck -check-prefix=UNSUP %s
32
Aaron Ballman530ea282021-08-05 07:04:03 -040033// UNSUP: error: invalid target ID 'gfx900:sram-ecc+'
Yaxun (Sam) Liu2cd75f72020-09-29 20:23:03 -040034
35// RUN: not %clang -target amdgcn-amd-amdhsa \
36// RUN: -mcpu=gfx900:xnack -nostdlib \
37// RUN: %s 2>&1 | FileCheck -check-prefix=NOSIGN %s
38
Aaron Ballman530ea282021-08-05 07:04:03 -040039// NOSIGN: error: invalid target ID 'gfx900:xnack'
Yaxun (Sam) Liu2cd75f72020-09-29 20:23:03 -040040
41// RUN: not %clang -target amdgcn-amd-amdhsa \
42// RUN: -mcpu=gfx900+xnack -nostdlib \
43// RUN: %s 2>&1 | FileCheck -check-prefix=NOCOLON %s
44
Aaron Ballman530ea282021-08-05 07:04:03 -040045// NOCOLON: error: invalid target ID 'gfx900+xnack'