brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.4 KiB · e6fa533 Raw
84 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=hawaii -enable-amdgpu-aa=0 -mattr=-promote-alloca,-load-store-opt,-enable-ds128 < %s | FileCheck -check-prefix=GCN %s2 3@sPrivateStorage = internal addrspace(3) global [256 x [8 x <4 x i64>]] poison4 5; GCN-LABEL: {{^}}ds_reorder_vector_split:6 7; Write zeroinitializer8; GCN-DAG: ds_write_b64 [[PTR:v[0-9]+]], [[VAL:v\[[0-9]+:[0-9]+\]]] offset:249; GCN-DAG: ds_write_b64 [[PTR]], [[VAL]] offset:1610; GCN-DAG: ds_write_b64 [[PTR]], [[VAL]] offset:811; GCN-DAG: ds_write_b64 [[PTR]], [[VAL]]{{$}}12 13; GCN: s_waitcnt vmcnt14 15; GCN-DAG: ds_write_b64 v{{[0-9]+}}, {{v\[[0-9]+:[0-9]+\]}} offset:2416; GCN-DAG: ds_write_b64 v{{[0-9]+}}, {{v\[[0-9]+:[0-9]+\]}} offset:1617; GCN-DAG: ds_write_b64 v{{[0-9]+}}, {{v\[[0-9]+:[0-9]+\]}} offset:818; Appears to be dead store of vector component.19; GCN-DAG: ds_write_b64 v{{[0-9]+}}, {{v\[[0-9]+:[0-9]+\]$}}20 21 22; GCN-DAG: ds_read_b64 {{v\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset:823; GCN-DAG: ds_read_b64 {{v\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset:1624; GCN-DAG: ds_read_b64 {{v\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset:2425 26; GCN-DAG: buffer_store_dwordx2 {{v\[[0-9]+:[0-9]+\]}}, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0 addr64{{$}}27; GCN-DAG: buffer_store_dwordx2 {{v\[[0-9]+:[0-9]+\]}}, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:828; GCN-DAG: buffer_store_dwordx2 {{v\[[0-9]+:[0-9]+\]}}, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:1629; GCN-DAG: buffer_store_dwordx2 {{v\[[0-9]+:[0-9]+\]}}, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:2430 31; GCN: s_endpgm32define amdgpu_kernel void @ds_reorder_vector_split(ptr addrspace(1) nocapture readonly %srcValues, ptr addrspace(1) nocapture readonly %offsets, ptr addrspace(1) nocapture %destBuffer, i32 %alignmentOffset, i32 %tmp, i32 %tmp1, i32 %x.i.12.i) #0 {33entry:34  %tmp2 = tail call i32 @llvm.amdgcn.workitem.id.x()35  %tmp3 = tail call i32 @llvm.amdgcn.workitem.id.y()36  %tmp4 = tail call i32 @llvm.amdgcn.workitem.id.z()37  %tmp6 = mul i32 %tmp2, %tmp38  %tmp10 = add i32 %tmp3, %tmp639  %tmp11 = mul i32 %tmp10, %tmp140  %tmp9 = add i32 %tmp11, %tmp441  %x.i.i = tail call i32 @llvm.amdgcn.workgroup.id.x() #142  %mul.26.i = mul i32 %x.i.12.i, %x.i.i43  %add.i = add i32 %tmp2, %mul.26.i44  %arrayidx = getelementptr [256 x [8 x <4 x i64>]], ptr addrspace(3) @sPrivateStorage, i32 0, i32 %tmp9, i32 %add.i45  store <4 x i64> zeroinitializer, ptr addrspace(3) %arrayidx46  %tmp12 = sext i32 %add.i to i6447  %arrayidx1 = getelementptr inbounds <4 x i64>, ptr addrspace(1) %srcValues, i64 %tmp1248  %tmp13 = load <4 x i64>, ptr addrspace(1) %arrayidx149  %arrayidx2 = getelementptr inbounds i32, ptr addrspace(1) %offsets, i64 %tmp1250  %tmp14 = load i32, ptr addrspace(1) %arrayidx251  %add.ptr = getelementptr [256 x [8 x <4 x i64>]], ptr addrspace(3) @sPrivateStorage, i32 0, i32 %tmp9, i32 0, i32 %alignmentOffset52  %mul.i = shl i32 %tmp14, 253  %arrayidx.i = getelementptr inbounds i64, ptr addrspace(3) %add.ptr, i32 %mul.i54  store <4 x i64> %tmp13, ptr addrspace(3) %arrayidx.i55  %add.ptr6 = getelementptr [256 x [8 x <4 x i64>]], ptr addrspace(3) @sPrivateStorage, i32 0, i32 %tmp9, i32 %tmp14, i32 %alignmentOffset56  %tmp16 = sext i32 %tmp14 to i6457  %tmp17 = sext i32 %alignmentOffset to i6458  %add.ptr9 = getelementptr inbounds <4 x i64>, ptr addrspace(1) %destBuffer, i64 %tmp16, i64 %tmp1759  %tmp18 = bitcast <4 x i64> %tmp13 to i25660  %trunc = trunc i256 %tmp18 to i6461  store i64 %trunc, ptr addrspace(1) %add.ptr962  %arrayidx10.1 = getelementptr inbounds i64, ptr addrspace(3) %add.ptr6, i32 163  %tmp19 = load i64, ptr addrspace(3) %arrayidx10.164  %arrayidx11.1 = getelementptr inbounds i64, ptr addrspace(1) %add.ptr9, i64 165  store i64 %tmp19, ptr addrspace(1) %arrayidx11.166  %arrayidx10.2 = getelementptr inbounds i64, ptr addrspace(3) %add.ptr6, i32 267  %tmp20 = load i64, ptr addrspace(3) %arrayidx10.268  %arrayidx11.2 = getelementptr inbounds i64, ptr addrspace(1) %add.ptr9, i64 269  store i64 %tmp20, ptr addrspace(1) %arrayidx11.270  %arrayidx10.3 = getelementptr inbounds i64, ptr addrspace(3) %add.ptr6, i32 371  %tmp21 = load i64, ptr addrspace(3) %arrayidx10.372  %arrayidx11.3 = getelementptr inbounds i64, ptr addrspace(1) %add.ptr9, i64 373  store i64 %tmp21, ptr addrspace(1) %arrayidx11.374  ret void75}76 77declare i32 @llvm.amdgcn.workgroup.id.x() #178declare i32 @llvm.amdgcn.workitem.id.x() #179declare i32 @llvm.amdgcn.workitem.id.y() #180declare i32 @llvm.amdgcn.workitem.id.z() #181 82attributes #0 = { norecurse nounwind }83attributes #1 = { nounwind readnone }84