brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 948b7b8 Raw
53 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GCN,GFX11 %s2; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GCN,GFX11 %s3; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GCN,GFX12 %s4; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GCN,GFX12 %s5 6; GCN-LABEL: {{^}}lds_direct_load:7; GCN: s_mov_b32 m08; GFX11: lds_direct_load v{{[0-9]+}}9; GFX12: ds_direct_load v{{[0-9]+}}10; GCN: s_mov_b32 m011; GFX11: lds_direct_load v{{[0-9]+}}12; GFX12: ds_direct_load v{{[0-9]+}}13; GCN: s_mov_b32 m014; GFX11: lds_direct_load v{{[0-9]+}}15; GFX11: s_waitcnt expcnt(2)16; GFX12: ds_direct_load v{{[0-9]+}}17; GFX12: s_wait_expcnt 0x218; GCN: v_add_f3219; GCN: buffer_store_b3220; GFX11: s_waitcnt expcnt(1)21; GFX12: s_wait_expcnt 0x122; GCN: buffer_store_b3223; GFX11: s_waitcnt expcnt(0)24; GFX12: s_wait_expcnt 0x025; GCN: buffer_store_b3226; GCN: buffer_store_b3227; GCN: buffer_store_b3228; GCN: buffer_store_b3229define amdgpu_ps void @lds_direct_load(ptr addrspace(8) inreg %buf, i32 inreg %arg0,30                                       i32 inreg %arg1, i32 inreg %arg2) #0 {31main_body:32  %p0 = call float @llvm.amdgcn.lds.direct.load(i32 %arg0)33  ; Ensure memory clustering is occuring for lds_direct_load34  %p5 = fadd float %p0, 1.035  %p1 = call float @llvm.amdgcn.lds.direct.load(i32 %arg1)36  %p2 = call float @llvm.amdgcn.lds.direct.load(i32 %arg2)37  %p3 = call float @llvm.amdgcn.lds.direct.load(i32 %arg1)38  %p4 = call float @llvm.amdgcn.lds.direct.load(i32 %arg2)39  call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %p5, ptr addrspace(8) %buf, i32 4, i32 0, i32 0)40  call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %p1, ptr addrspace(8) %buf, i32 4, i32 1, i32 0)41  call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %p2, ptr addrspace(8) %buf, i32 4, i32 2, i32 0)42  call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %p3, ptr addrspace(8) %buf, i32 4, i32 3, i32 0)43  call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %p4, ptr addrspace(8) %buf, i32 4, i32 4, i32 0)44  call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %p0, ptr addrspace(8) %buf, i32 4, i32 5, i32 0)45  ret void46}47 48declare float @llvm.amdgcn.lds.direct.load(i32) #149declare void @llvm.amdgcn.raw.ptr.buffer.store.f32(float, ptr addrspace(8), i32, i32, i32)50 51attributes #0 = { nounwind }52attributes #1 = { nounwind readonly }53