Skip to content

Commit bebe142

Browse files
arsenmsvkeerthy
authored andcommitted
AMDGPU: Delete seemingly dead s_fmaak_f32/s_fmamk_f32 folding code (#140580)
No tests fail with this. I'm not sure I understand the comment, there can't be any folding into an operand that had to already be a constant. I tried different combinations of immediates to these instructions but never hit the condition.
1 parent a267962 commit bebe142

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -766,17 +766,6 @@ bool SIFoldOperandsImpl::tryAddToFoldList(
766766
return true;
767767
}
768768

769-
// Inlineable constant might have been folded into Imm operand of fmaak or
770-
// fmamk and we are trying to fold a non-inlinable constant.
771-
if ((Opc == AMDGPU::S_FMAAK_F32 || Opc == AMDGPU::S_FMAMK_F32) &&
772-
!OpToFold->isReg() && !TII->isInlineConstant(*OpToFold)) {
773-
unsigned ImmIdx = Opc == AMDGPU::S_FMAAK_F32 ? 3 : 2;
774-
MachineOperand &OpImm = MI->getOperand(ImmIdx);
775-
if (!OpImm.isReg() &&
776-
TII->isInlineConstant(*MI, MI->getOperand(OpNo), OpImm))
777-
return tryToFoldAsFMAAKorMK();
778-
}
779-
780769
// Special case for s_fmac_f32 if we are trying to fold into Src0 or Src1.
781770
// By changing into fmamk we can untie Src2.
782771
// If folding for Src0 happens first and it is identical operand to Src1 we

0 commit comments

Comments
 (0)