AMDGPU: Emit note directive for HSA even if there are no functions
[oota-llvm.git] / test / CodeGen / AMDGPU / flat-scratch-reg.ll
1 ; RUN: llc < %s -march=amdgcn -mcpu=kaveri -verify-machineinstrs | FileCheck %s --check-prefix=GCN --check-prefix=CI --check-prefix=NO-XNACK
2 ; RUN: llc < %s -march=amdgcn -mcpu=fiji -verify-machineinstrs | FileCheck %s --check-prefix=GCN --check-prefix=VI --check-prefix=NO-XNACK
3 ; RUN: llc < %s -march=amdgcn -mcpu=carrizo -mattr=+xnack -verify-machineinstrs | FileCheck %s --check-prefix=GCN --check-prefix=VI --check-prefix=XNACK
4
5 ; GCN-LABEL: {{^}}no_vcc_no_flat:
6 ; NO-XNACK: ; NumSgprs: 8
7 ; XNACK: ; NumSgprs: 12
8 define void @no_vcc_no_flat() {
9 entry:
10   call void asm sideeffect "", "~{SGPR7}"()
11   ret void
12 }
13
14 ; GCN-LABEL: {{^}}vcc_no_flat:
15 ; NO-XNACK: ; NumSgprs: 10
16 ; XNACK: ; NumSgprs: 12
17 define void @vcc_no_flat() {
18 entry:
19   call void asm sideeffect "", "~{SGPR7},~{VCC}"()
20   ret void
21 }
22
23 ; GCN-LABEL: {{^}}no_vcc_flat:
24 ; CI: ; NumSgprs: 12
25 ; VI: ; NumSgprs: 14
26 define void @no_vcc_flat() {
27 entry:
28   call void asm sideeffect "", "~{SGPR7},~{FLAT_SCR}"()
29   ret void
30 }
31
32 ; GCN-LABEL: {{^}}vcc_flat:
33 ; CI: ; NumSgprs: 12
34 ; VI: ; NumSgprs: 14
35 define void @vcc_flat() {
36 entry:
37   call void asm sideeffect "", "~{SGPR7},~{VCC},~{FLAT_SCR}"()
38   ret void
39 }