Skip to content

Commit aa8b624

Browse files
authored
AMDGPU: Remove unnecessary operand legalization for WMMAs (#159370)
The operand constraints already express this constraint, and InstrEmitter will respect them.
1 parent bb013a4 commit aa8b624

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6547,21 +6547,6 @@ void SIInstrInfo::legalizeOperandsVOP3(MachineRegisterInfo &MRI,
65476547
!RI.isVGPR(MRI, MI.getOperand(VOP3Idx[2]).getReg()))
65486548
legalizeOpWithMove(MI, VOP3Idx[2]);
65496549

6550-
if (isWMMA(MI)) {
6551-
// scale_src has a register class restricted to low 256 VGPRs, we may need
6552-
// to insert a copy to the restricted VGPR class.
6553-
int ScaleSrc0Idx =
6554-
AMDGPU::getNamedOperandIdx(Opc, AMDGPU::OpName::scale_src0);
6555-
if (ScaleSrc0Idx != -1) {
6556-
int ScaleSrc1Idx =
6557-
AMDGPU::getNamedOperandIdx(Opc, AMDGPU::OpName::scale_src1);
6558-
if (!isOperandLegal(MI, ScaleSrc0Idx))
6559-
legalizeOpWithMove(MI, ScaleSrc0Idx);
6560-
if (!isOperandLegal(MI, ScaleSrc1Idx))
6561-
legalizeOpWithMove(MI, ScaleSrc1Idx);
6562-
}
6563-
}
6564-
65656550
// Fix the register class of packed FP32 instructions on gfx12+. See
65666551
// SIInstrInfo::isLegalGFX12PlusPackedMathFP32Operand for more information.
65676552
if (AMDGPU::isPackedFP32Inst(Opc) && AMDGPU::isGFX12Plus(ST)) {

0 commit comments

Comments
 (0)