llvm.org GIT mirror llvm / e86bd0e
[AMDGPU] w/a for gfx908 mfma SrcC literal HW bug gfx908 ignores an mfma if SrcC is a literal. Differential Revision: https://reviews.llvm.org/D66670 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369818 91177308-0d34-0410-b5e6-96231b3b80d8 Stanislav Mekhanoshin 23 days ago
1 changed file(s) with 9 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
28652865 if (OpInfo.RegClass < 0)
28662866 return false;
28672867
2868 if (MO.isImm() && isInlineConstant(MO, OpInfo))
2868 const MachineFunction *MF = MI.getParent()->getParent();
2869 const GCNSubtarget &ST = MF->getSubtarget();
2870
2871 if (MO.isImm() && isInlineConstant(MO, OpInfo)) {
2872 if (isMAI(MI) && ST.hasMFMAInlineLiteralBug() &&
2873 OpNo ==(unsigned)AMDGPU::getNamedOperandIdx(MI.getOpcode(),
2874 AMDGPU::OpName::src2))
2875 return false;
28692876 return RI.opCanUseInlineConstant(OpInfo.OperandType);
2877 }
28702878
28712879 if (!RI.opCanUseLiteralConstant(OpInfo.OperandType))
28722880 return false;
28742882 if (!isVOP3(MI) || !AMDGPU::isSISrcOperand(InstDesc, OpNo))
28752883 return true;
28762884
2877 const MachineFunction *MF = MI.getParent()->getParent();
2878 const GCNSubtarget &ST = MF->getSubtarget();
28792885 return ST.hasVOP3Literal();
28802886 }
28812887