Skip to content

Commit dc5e6fe

Browse files
committed
Added amdgcn_update_dpp
1 parent 6c2938a commit dc5e6fe

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6463,6 +6463,7 @@ void SITargetLowering::ReplaceNodeResults(SDNode *N,
64636463
case Intrinsic::amdgcn_set_inactive:
64646464
case Intrinsic::amdgcn_set_inactive_chain_arg:
64656465
case Intrinsic::amdgcn_mov_dpp8:
6466+
case Intrinsic::amdgcn_update_dpp:
64666467
Results.push_back(lowerLaneOp(*this, N, DAG));
64676468
return;
64686469
}

llvm/test/CodeGen/AMDGPU/llvm.amdgcn.update.dpp.ll

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,24 @@ define amdgpu_kernel void @dpp_test_v2f16_imm_comb8(ptr addrspace(1) %out, <2 x
576576
ret void
577577
}
578578

579+
; GCN-LABEL: {{^}}dpp_i8:
580+
; GCN: v_mov_b32_dpp v2, v2 quad_perm:[1,0,0,0] row_mask:0x1 bank_mask:0x1{{$}}
581+
; GCN: store_{{byte|b8}} v[0:1], v2
582+
define void @dpp_i8(ptr addrspace(1) %out, i8 %in) {
583+
%tmp0 = call i8 @llvm.amdgcn.update.dpp.i8(i8 %in, i8 %in, i32 1, i32 1, i32 1, i1 false) #0
584+
store i8 %tmp0, ptr addrspace(1) %out
585+
ret void
586+
}
587+
588+
; GCN-LABEL: {{^}}dpp_i1:
589+
; GCN: v_mov_b32_dpp v2, v2 quad_perm:[1,0,0,0] row_mask:0x1 bank_mask:0x1{{$}}
590+
; GCN: store_{{byte|b8}} v[0:1], v2
591+
define void @dpp_i1(ptr addrspace(1) %out, i1 %in) {
592+
%tmp0 = call i1 @llvm.amdgcn.update.dpp.i8(i1 %in, i1 %in, i32 1, i32 1, i32 1, i1 false) #0
593+
store i1 %tmp0, ptr addrspace(1) %out
594+
ret void
595+
}
596+
579597
declare i32 @llvm.amdgcn.workitem.id.x()
580598
declare void @llvm.amdgcn.s.barrier()
581599
declare i32 @llvm.amdgcn.update.dpp.i32(i32, i32, i32, i32, i32, i1) #0

0 commit comments

Comments
 (0)