Lines Matching refs:MRI

71                                   const MachineRegisterInfo &MRI) {  in opMustUseVOP3Encoding()  argument
73 MRI.getType(MI.getOperand(0).getReg()).getScalarSizeInBits() == 64; in opMustUseVOP3Encoding()
117 static bool allUsesHaveSourceMods(MachineInstr &MI, MachineRegisterInfo &MRI, in allUsesHaveSourceMods() argument
126 for (const MachineInstr &Use : MRI.use_nodbg_instructions(Dst)) { in allUsesHaveSourceMods()
130 if (!opMustUseVOP3Encoding(Use, MRI)) { in allUsesHaveSourceMods()
156 MachineRegisterInfo &MRI) { in isConstantCostlierToNegate() argument
158 if (mi_match(Reg, MRI, m_GFCstOrSplat(FPValReg))) { in isConstantCostlierToNegate()
195 MatchInfo = MRI.getVRegDef(Src); in matchFoldableFneg()
201 if (MRI.hasOneNonDBGUse(Src)) { in matchFoldableFneg()
202 if (allUsesHaveSourceMods(MI, MRI, 0)) in matchFoldableFneg()
206 (allUsesHaveSourceMods(MI, MRI) || in matchFoldableFneg()
207 !allUsesHaveSourceMods(*MatchInfo, MRI))) in matchFoldableFneg()
222 MatchInfo->getOperand(2).getReg(), MRI); in matchFoldableFneg()
279 if (!mi_match(Reg, MRI, m_GFNeg(m_Reg(Reg)))) in applyFoldableFneg()
280 Reg = Builder.buildFNeg(MRI.getType(Reg), Reg).getReg(0); in applyFoldableFneg()
281 replaceRegOpWith(MRI, Op, Reg); in applyFoldableFneg()
288 if (mi_match(XReg, MRI, m_GFNeg(m_Reg(XReg)))) in applyFoldableFneg()
289 replaceRegOpWith(MRI, X, XReg); in applyFoldableFneg()
290 else if (mi_match(YReg, MRI, m_GFNeg(m_Reg(YReg)))) in applyFoldableFneg()
291 replaceRegOpWith(MRI, Y, YReg); in applyFoldableFneg()
293 YReg = Builder.buildFNeg(MRI.getType(YReg), YReg).getReg(0); in applyFoldableFneg()
294 replaceRegOpWith(MRI, Y, YReg); in applyFoldableFneg()
375 if (MRI.hasOneNonDBGUse(MatchInfoDst)) { in applyFoldableFneg()
377 replaceRegWith(MRI, Dst, MatchInfoDst); in applyFoldableFneg()
382 LLT Type = MRI.getType(Dst); in applyFoldableFneg()
383 Register NegatedMatchInfo = MRI.createGenericVirtualRegister(Type); in applyFoldableFneg()
384 replaceRegOpWith(MRI, MatchInfo->getOperand(0), NegatedMatchInfo); in applyFoldableFneg()
387 replaceRegWith(MRI, Dst, NegatedMatchInfo); in applyFoldableFneg()
400 static bool isFPExtFromF16OrConst(const MachineRegisterInfo &MRI, in isFPExtFromF16OrConst() argument
402 const MachineInstr *Def = MRI.getVRegDef(Reg); in isFPExtFromF16OrConst()
405 return MRI.getType(SrcReg) == LLT::scalar(16); in isFPExtFromF16OrConst()
424 if (!MRI.hasOneNonDBGUse(SrcReg) || MRI.getType(SrcReg) != LLT::scalar(32)) in matchExpandPromotedF16FMed3()
427 return isFPExtFromF16OrConst(MRI, Src0) && isFPExtFromF16OrConst(MRI, Src1) && in matchExpandPromotedF16FMed3()
428 isFPExtFromF16OrConst(MRI, Src2); in matchExpandPromotedF16FMed3()
443 LLT Ty = MRI.getType(Src0); in applyExpandPromotedF16FMed3()