[llvm] [AMDGPU][NFC] Add SingleSGPRReadFromTuple feature and rename related functions (PR #211933)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 15:50:17 PDT 2026


================
@@ -6896,12 +6892,12 @@ void SIInstrInfo::legalizeOperandsVOP3(MachineRegisterInfo &MRI,
       !RI.isVGPR(MRI, MI.getOperand(VOP3Idx[2]).getReg()))
     legalizeOpWithMove(MI, VOP3Idx[2]);
 
-  // Fix the register class of packed FP32 instructions on gfx12+. See
-  // SIInstrInfo::isLegalGFX12PlusPackedMathFP32or64BitOperand for more
-  // information.
-  if (AMDGPU::isPackedFP32or64BitInst(Opc) && AMDGPU::isGFX12Plus(ST)) {
+  // Fix the register class of 64-bit or wider packed instructions on target
+  // that reads a sigle sgpr from a tuple.
+  // Ser SIInstrInfo::isLegalWidePackedInstOperand for more information.
+  if (ST.hasSingleSGPRReadFromTuple() && AMDGPU::isWidePackedInst(Opc)) {
----------------
rampitec wrote:

That will accidentally catch f32 instructions which is not intended as these support OPSEL.

https://github.com/llvm/llvm-project/pull/211933


More information about the llvm-commits mailing list