2016-02-19 23:33:13 +08:00
|
|
|
; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=kaveri | FileCheck --check-prefix=GCN %s
|
2017-01-25 06:02:15 +08:00
|
|
|
; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=fiji -mattr=-flat-for-global | FileCheck --check-prefix=GCN %s
|
2016-02-19 23:33:13 +08:00
|
|
|
|
|
|
|
; If flat_store_dword and flat_load_dword use different registers for the data
|
|
|
|
; operand, this test is not broken. It just means it is no longer testing
|
|
|
|
; for the original bug.
|
|
|
|
|
|
|
|
; GCN: {{^}}test:
|
2016-05-21 11:55:07 +08:00
|
|
|
; XGCN: flat_store_dword v[{{[0-9]+:[0-9]+}}], [[DATA:v[0-9]+]]
|
|
|
|
; XGCN: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
|
|
; XGCN: flat_load_dword [[DATA]], v[{{[0-9]+:[0-9]+}}]
|
2016-02-19 23:33:13 +08:00
|
|
|
define void @test(i32 addrspace(1)* %out, i32 %in) {
|
|
|
|
store volatile i32 0, i32 addrspace(1)* %out
|
|
|
|
%val = load volatile i32, i32 addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|