• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck %s
2; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck %s
3
4; CHECK-LABEL: {{^}}test1:
5; CHECK: ds_write_b32
6; CHECK: ds_read_b32
7; CHECK: ds_write_b32
8define amdgpu_vs void @test1(i32 %v) #0 {
9  %p0 = getelementptr i32, i32 addrspace(3)* null, i32 0
10  %p1 = getelementptr i32, i32 addrspace(3)* null, i32 1
11
12  store i32 %v, i32 addrspace(3)* %p0
13
14  call void @llvm.amdgcn.raw.tbuffer.store.i32(i32 %v, <4 x i32> undef, i32 0, i32 0, i32 68, i32 1)
15
16  %w = load i32, i32 addrspace(3)* %p0
17  store i32 %w, i32 addrspace(3)* %p1
18  ret void
19}
20
21declare void @llvm.amdgcn.raw.tbuffer.store.i32(i32, <4 x i32>, i32, i32, i32 immarg, i32 immarg) #1
22
23attributes #0 = { nounwind }
24attributes #1 = { nounwind willreturn writeonly }
25