Skip to content

Commit 667ed2e

Browse files
committed
AMDGPU: Delete seemingly dead s_fmaak_f32/s_fmamk_f32 folding code
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 e33e623 commit 667ed2e

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
@@ -767,17 +767,6 @@ bool SIFoldOperandsImpl::tryAddToFoldList(
767767
return true;
768768
}
769769

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

0 commit comments

Comments
 (0)