Lines Matching refs:Fold
167 static bool updateOperand(FoldCandidate &Fold, in updateOperand() argument
170 MachineInstr *MI = Fold.UseMI; in updateOperand()
171 MachineOperand &Old = MI->getOperand(Fold.UseOpNo); in updateOperand()
174 if (Fold.isImm()) { in updateOperand()
194 if (!isUInt<16>(Fold.ImmToFold)) { in updateOperand()
195 if (!(Fold.ImmToFold & 0xffff)) { in updateOperand()
198 Old.ChangeToImmediate((Fold.ImmToFold >> 16) & 0xffff); in updateOperand()
206 if ((Fold.isImm() || Fold.isFI()) && Fold.needsShrink()) { in updateOperand()
213 int Op32 = Fold.getShrinkOpcode(); in updateOperand()
241 if (Fold.isCommuted()) in updateOperand()
246 assert(!Fold.needsShrink() && "not handled"); in updateOperand()
248 if (Fold.isImm()) { in updateOperand()
249 Old.ChangeToImmediate(Fold.ImmToFold); in updateOperand()
253 if (Fold.isFI()) { in updateOperand()
254 Old.ChangeToFrameIndex(Fold.FrameIndexToFold); in updateOperand()
258 MachineOperand *New = Fold.OpToFold; in updateOperand()
885 for (FoldCandidate &Fold : FoldList) { in foldInstOperand()
886 if (updateOperand(Fold, *TII, *TRI)) { in foldInstOperand()
888 if (Fold.isReg()) { in foldInstOperand()
889 assert(Fold.OpToFold && Fold.OpToFold->isReg()); in foldInstOperand()
893 MRI->clearKillFlags(Fold.OpToFold->getReg()); in foldInstOperand()
896 << static_cast<int>(Fold.UseOpNo) << " of " in foldInstOperand()
897 << *Fold.UseMI << '\n'); in foldInstOperand()
898 tryFoldInst(TII, Fold.UseMI); in foldInstOperand()
899 } else if (Fold.isCommuted()) { in foldInstOperand()
901 TII->commuteInstruction(*Fold.UseMI, false); in foldInstOperand()