[llvm] [AMDGPU] Src1 of VOP3 DPP instructions can be SGPR on supported subtargets (PR #67461)
Joe Nash via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 08:40:28 PDT 2023
================
@@ -301,7 +302,14 @@ MachineInstr *GCNDPPCombine::createDPPInst(MachineInstr &OrigMI,
}
auto *Src1 = TII->getNamedOperand(OrigMI, AMDGPU::OpName::src1);
if (Src1) {
- if (!TII->isOperandLegal(*DPPInst.getInstr(), NumOperands, Src1)) {
+ int OpNum = NumOperands;
+ // If subtarget does not support SGPRs for src1 operand then the
+ // requirements are the same as for src0. We check src0 instead because
+ // pseudos are shared between subtargets and allow SGPR for src1 on all.
----------------
Sisyph wrote:
Something like assert(src0->getType()->isFloatTy() == src1)->getType()->isFloatTy()) ? Do you think it's useful?
https://github.com/llvm/llvm-project/pull/67461
More information about the llvm-commits
mailing list