[llvm] 1abf257 - [AMDGPU] Make use of CPol::SWZ_* in SelectionDAG. NFC.
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 07:48:50 PST 2024
Author: Jay Foad
Date: 2024-01-19T15:48:45Z
New Revision: 1abf2570b305a972d30af75a12dd4e835fb34c26
URL: https://github.com/llvm/llvm-project/commit/1abf2570b305a972d30af75a12dd4e835fb34c26
DIFF: https://github.com/llvm/llvm-project/commit/1abf2570b305a972d30af75a12dd4e835fb34c26.diff
LOG: [AMDGPU] Make use of CPol::SWZ_* in SelectionDAG. NFC.
For GlobalISel this was already done in
AMDGPUInstructionSelector::selectBufferLoadLds.
Added:
Modified:
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 929b5d004782d3..cc0c4d4e36eaa8 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -9453,6 +9453,7 @@ SDValue SITargetLowering::LowerINTRINSIC_VOID(SDValue Op,
case Intrinsic::amdgcn_raw_ptr_buffer_load_lds:
case Intrinsic::amdgcn_struct_buffer_load_lds:
case Intrinsic::amdgcn_struct_ptr_buffer_load_lds: {
+ assert(!AMDGPU::isGFX12Plus(*Subtarget));
unsigned Opc;
bool HasVIndex =
IntrinsicID == Intrinsic::amdgcn_struct_buffer_load_lds ||
@@ -9505,8 +9506,8 @@ SDValue SITargetLowering::LowerINTRINSIC_VOID(SDValue Op,
unsigned Aux = Op.getConstantOperandVal(8 + OpOffset);
Ops.push_back(
DAG.getTargetConstant(Aux & AMDGPU::CPol::ALL, DL, MVT::i8)); // cpol
- Ops.push_back(
- DAG.getTargetConstant((Aux >> 3) & 1, DL, MVT::i8)); // swz
+ Ops.push_back(DAG.getTargetConstant(
+ Aux & AMDGPU::CPol::SWZ_pregfx12 ? 1 : 0, DL, MVT::i8)); // swz
Ops.push_back(M0Val.getValue(0)); // Chain
Ops.push_back(M0Val.getValue(1)); // Glue
More information about the llvm-commits
mailing list