Skip to content

AMDGPU: Delete seemingly dead s_fmaak_f32/s_fmamk_f32 folding code #140580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,17 +766,6 @@ bool SIFoldOperandsImpl::tryAddToFoldList(
return true;
}

// Inlineable constant might have been folded into Imm operand of fmaak or
// fmamk and we are trying to fold a non-inlinable constant.
if ((Opc == AMDGPU::S_FMAAK_F32 || Opc == AMDGPU::S_FMAMK_F32) &&
!OpToFold->isReg() && !TII->isInlineConstant(*OpToFold)) {
unsigned ImmIdx = Opc == AMDGPU::S_FMAAK_F32 ? 3 : 2;
MachineOperand &OpImm = MI->getOperand(ImmIdx);
if (!OpImm.isReg() &&
TII->isInlineConstant(*MI, MI->getOperand(OpNo), OpImm))
return tryToFoldAsFMAAKorMK();
}

// Special case for s_fmac_f32 if we are trying to fold into Src0 or Src1.
// By changing into fmamk we can untie Src2.
// If folding for Src0 happens first and it is identical operand to Src1 we
Expand Down
Loading