2016-10-27 16:15:07 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck %s
|
2017-01-25 06:02:15 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck %s
|
2016-10-27 16:15:07 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: {{^}}test1:
|
|
|
|
; CHECK: ds_write_b32
|
|
|
|
; CHECK: ds_read_b32
|
|
|
|
; CHECK: ds_write_b32
|
|
|
|
define amdgpu_vs void @test1(i32 %v) #0 {
|
|
|
|
%p0 = getelementptr i32, i32 addrspace(3)* null, i32 0
|
|
|
|
%p1 = getelementptr i32, i32 addrspace(3)* null, i32 1
|
|
|
|
|
|
|
|
store i32 %v, i32 addrspace(3)* %p0
|
|
|
|
|
2017-06-23 00:29:22 +08:00
|
|
|
call void @llvm.amdgcn.tbuffer.store.i32(i32 %v, <4 x i32> undef, i32 0, i32 0, i32 0, i32 0, i32 4, i32 4, i1 1, i1 0)
|
2016-10-27 16:15:07 +08:00
|
|
|
|
|
|
|
%w = load i32, i32 addrspace(3)* %p0
|
|
|
|
store i32 %w, i32 addrspace(3)* %p1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2017-06-23 00:29:22 +08:00
|
|
|
declare void @llvm.amdgcn.tbuffer.store.i32(i32, <4 x i32>, i32, i32, i32, i32, i32, i32, i1, i1) #0
|
2016-10-27 16:15:07 +08:00
|
|
|
|
|
|
|
attributes #0 = { nounwind }
|