Skip to content

Commit 1abf257

Browse files
committed
[AMDGPU] Make use of CPol::SWZ_* in SelectionDAG. NFC.
For GlobalISel this was already done in AMDGPUInstructionSelector::selectBufferLoadLds.
1 parent 5dbb30d commit 1abf257

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9453,6 +9453,7 @@ SDValue SITargetLowering::LowerINTRINSIC_VOID(SDValue Op,
94539453
case Intrinsic::amdgcn_raw_ptr_buffer_load_lds:
94549454
case Intrinsic::amdgcn_struct_buffer_load_lds:
94559455
case Intrinsic::amdgcn_struct_ptr_buffer_load_lds: {
9456+
assert(!AMDGPU::isGFX12Plus(*Subtarget));
94569457
unsigned Opc;
94579458
bool HasVIndex =
94589459
IntrinsicID == Intrinsic::amdgcn_struct_buffer_load_lds ||
@@ -9505,8 +9506,8 @@ SDValue SITargetLowering::LowerINTRINSIC_VOID(SDValue Op,
95059506
unsigned Aux = Op.getConstantOperandVal(8 + OpOffset);
95069507
Ops.push_back(
95079508
DAG.getTargetConstant(Aux & AMDGPU::CPol::ALL, DL, MVT::i8)); // cpol
9508-
Ops.push_back(
9509-
DAG.getTargetConstant((Aux >> 3) & 1, DL, MVT::i8)); // swz
9509+
Ops.push_back(DAG.getTargetConstant(
9510+
Aux & AMDGPU::CPol::SWZ_pregfx12 ? 1 : 0, DL, MVT::i8)); // swz
95109511
Ops.push_back(M0Val.getValue(0)); // Chain
95119512
Ops.push_back(M0Val.getValue(1)); // Glue
95129513

0 commit comments

Comments
 (0)