Lines Matching defs:CmpInstr

3492 optimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg, unsigned SrcReg2,
3497 switch (CmpInstr->getOpcode()) {
3514 if (!MRI->use_nodbg_empty(CmpInstr->getOperand(0).getReg()))
3517 switch (CmpInstr->getOpcode()) {
3535 CmpInstr->setDesc(get(NewOpcode));
3536 CmpInstr->RemoveOperand(0);
3548 // CmpInstr is the first instruction of the BB.
3549 MachineBasicBlock::iterator I = CmpInstr, Def = MI;
3552 // EFLAGS. If MI is not in the same BB as CmpInstr, do not optimize.
3554 if (IsCmpZero && (MI->getParent() != CmpInstr->getParent() ||
3558 // We are searching for an earlier instruction that can make CmpInstr
3563 // We iterate backward, starting from the instruction before CmpInstr and
3565 // RI points to the instruction before CmpInstr.
3570 RE = CmpInstr->getParent() == MI->getParent() ?
3572 CmpInstr->getParent()->rend();
3576 // Check whether CmpInstr can be made redundant by the current instruction.
3578 isRedundantFlagInstr(CmpInstr, SrcReg, SrcReg2, CmpValue, Instr)) {
3596 // We can't remove CmpInstr.
3608 // Scan forward from the instruction after CmpInstr for uses of EFLAGS.
3609 // It is safe to remove CmpInstr if EFLAGS is redefined or killed.
3614 MachineBasicBlock::iterator E = CmpInstr->getParent()->end();
3621 // It is safe to remove CmpInstr if EFLAGS is updated again.
3676 // If it is safe to remove CmpInstr, the condition code of these
3681 // It is safe to remove CmpInstr if EFLAGS is updated again or killed.
3690 MachineBasicBlock *MBB = CmpInstr->getParent();
3731 CmpInstr->eraseFromParent();