2016-12-10 03:49:48 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=kaveri -verify-machineinstrs < %s | FileCheck -check-prefix=CI -check-prefix=GCN %s
|
|
|
|
; RUN: llc -march=amdgcn -mcpu=fiji -verify-machineinstrs < %s | FileCheck -check-prefix=VI-NOXNACK -check-prefix=GCN %s
|
2016-12-10 03:49:54 +08:00
|
|
|
|
|
|
|
; RUN: llc -march=amdgcn -mcpu=carrizo -mattr=-xnack -verify-machineinstrs < %s | FileCheck -check-prefix=VI-NOXNACK -check-prefix=GCN %s
|
|
|
|
; RUN: llc -march=amdgcn -mcpu=stoney -mattr=-xnack -verify-machineinstrs < %s | FileCheck -check-prefix=VI-NOXNACK -check-prefix=GCN %s
|
|
|
|
|
2016-12-10 03:49:48 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=carrizo -verify-machineinstrs < %s | FileCheck -check-prefix=VI-XNACK -check-prefix=GCN %s
|
2017-01-25 06:02:15 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=stoney -verify-machineinstrs < %s | FileCheck -check-prefix=VI-XNACK -check-prefix=GCN %s
|
2016-07-27 00:45:50 +08:00
|
|
|
|
2016-12-10 03:49:48 +08:00
|
|
|
; RUN: llc -march=amdgcn -mtriple=amdgcn--amdhsa -mcpu=kaveri -verify-machineinstrs < %s | FileCheck -check-prefix=HSA-CI -check-prefix=GCN %s
|
|
|
|
; RUN: llc -march=amdgcn -mtriple=amdgcn--amdhsa -mcpu=carrizo -mattr=-xnack -verify-machineinstrs < %s | FileCheck -check-prefix=HSA-VI-NOXNACK -check-prefix=GCN %s
|
|
|
|
; RUN: llc -march=amdgcn -mtriple=amdgcn--amdhsa -mcpu=carrizo -mattr=+xnack -verify-machineinstrs < %s | FileCheck -check-prefix=HSA-VI-XNACK -check-prefix=GCN %s
|
2015-12-18 01:05:09 +08:00
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}no_vcc_no_flat:
|
2016-12-10 03:49:48 +08:00
|
|
|
; HSA-CI: is_xnack_enabled = 0
|
|
|
|
; HSA-VI-NOXNACK: is_xnack_enabled = 0
|
|
|
|
; HSA-VI-XNACK: is_xnack_enabled = 1
|
2016-07-27 00:45:50 +08:00
|
|
|
|
2016-12-10 03:49:48 +08:00
|
|
|
; CI: ; NumSgprs: 8
|
|
|
|
; VI-NOXNACK: ; NumSgprs: 8
|
|
|
|
; VI-XNACK: ; NumSgprs: 12
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @no_vcc_no_flat() {
|
2015-12-18 01:05:09 +08:00
|
|
|
entry:
|
2017-06-09 03:03:20 +08:00
|
|
|
call void asm sideeffect "", "~{s7}"()
|
2015-12-18 01:05:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}vcc_no_flat:
|
2016-12-10 03:49:48 +08:00
|
|
|
; HSA-CI: is_xnack_enabled = 0
|
|
|
|
; HSA-VI-NOXNACK: is_xnack_enabled = 0
|
|
|
|
; HSA-VI-XNACK: is_xnack_enabled = 1
|
2016-07-27 00:45:50 +08:00
|
|
|
|
2016-12-10 03:49:48 +08:00
|
|
|
; CI: ; NumSgprs: 10
|
|
|
|
; VI-NOXNACK: ; NumSgprs: 10
|
|
|
|
; VI-XNACK: ; NumSgprs: 12
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @vcc_no_flat() {
|
2015-12-18 01:05:09 +08:00
|
|
|
entry:
|
2017-06-09 03:03:20 +08:00
|
|
|
call void asm sideeffect "", "~{s7},~{vcc}"()
|
2015-12-18 01:05:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}no_vcc_flat:
|
2016-12-10 03:49:48 +08:00
|
|
|
; HSA-CI: is_xnack_enabled = 0
|
|
|
|
; HSA-VI-NOXNACK: is_xnack_enabled = 0
|
|
|
|
; HSA-VI-XNACK: is_xnack_enabled = 1
|
2016-07-27 00:45:50 +08:00
|
|
|
|
2017-04-18 03:48:30 +08:00
|
|
|
; CI: ; NumSgprs: 12
|
|
|
|
; VI-NOXNACK: ; NumSgprs: 14
|
|
|
|
; VI-XNACK: ; NumSgprs: 14
|
|
|
|
; HSA-CI: ; NumSgprs: 12
|
|
|
|
; HSA-VI-NOXNACK: ; NumSgprs: 14
|
|
|
|
; HSA-VI-XNACK: ; NumSgprs: 14
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @no_vcc_flat() {
|
2015-12-18 01:05:09 +08:00
|
|
|
entry:
|
2017-06-09 03:03:20 +08:00
|
|
|
call void asm sideeffect "", "~{s7},~{flat_scratch}"()
|
2015-12-18 01:05:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}vcc_flat:
|
2016-07-27 00:45:50 +08:00
|
|
|
; HSA-NOXNACK: is_xnack_enabled = 0
|
|
|
|
; HSA-XNACK: is_xnack_enabled = 1
|
|
|
|
|
2017-04-18 03:48:30 +08:00
|
|
|
; CI: ; NumSgprs: 12
|
|
|
|
; VI-NOXNACK: ; NumSgprs: 14
|
|
|
|
; VI-XNACK: ; NumSgprs: 14
|
|
|
|
; HSA-CI: ; NumSgprs: 12
|
|
|
|
; HSA-VI-NOXNACK: ; NumSgprs: 14
|
|
|
|
; HSA-VI-XNACK: ; NumSgprs: 14
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @vcc_flat() {
|
2015-12-18 01:05:09 +08:00
|
|
|
entry:
|
2017-06-09 03:03:20 +08:00
|
|
|
call void asm sideeffect "", "~{s7},~{vcc},~{flat_scratch}"()
|
2015-12-18 01:05:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
2017-04-18 03:48:30 +08:00
|
|
|
|
|
|
|
; Make sure used SGPR count for flat_scr is correct when there is no
|
|
|
|
; scratch usage and implicit flat uses.
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}use_flat_scr:
|
|
|
|
; CI: NumSgprs: 4
|
|
|
|
; VI-NOXNACK: NumSgprs: 6
|
|
|
|
; VI-XNACK: NumSgprs: 6
|
|
|
|
define amdgpu_kernel void @use_flat_scr() #0 {
|
|
|
|
entry:
|
2017-06-09 03:03:20 +08:00
|
|
|
call void asm sideeffect "; clobber ", "~{flat_scratch}"()
|
2017-04-18 03:48:30 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}use_flat_scr_lo:
|
|
|
|
; CI: NumSgprs: 4
|
|
|
|
; VI-NOXNACK: NumSgprs: 6
|
|
|
|
; VI-XNACK: NumSgprs: 6
|
|
|
|
define amdgpu_kernel void @use_flat_scr_lo() #0 {
|
|
|
|
entry:
|
2017-06-09 03:03:20 +08:00
|
|
|
call void asm sideeffect "; clobber ", "~{flat_scratch_lo}"()
|
2017-04-18 03:48:30 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}use_flat_scr_hi:
|
|
|
|
; CI: NumSgprs: 4
|
|
|
|
; VI-NOXNACK: NumSgprs: 6
|
|
|
|
; VI-XNACK: NumSgprs: 6
|
|
|
|
define amdgpu_kernel void @use_flat_scr_hi() #0 {
|
|
|
|
entry:
|
2017-06-09 03:03:20 +08:00
|
|
|
call void asm sideeffect "; clobber ", "~{flat_scratch_hi}"()
|
2017-04-18 03:48:30 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
attributes #0 = { nounwind }
|