Home | History | Annotate | Download | only in X86

Lines Matching full:cmpinstr

3362 optimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg, unsigned SrcReg2,
3367 switch (CmpInstr->getOpcode()) {
3384 if (!MRI->use_nodbg_empty(CmpInstr->getOperand(0).getReg()))
3387 switch (CmpInstr->getOpcode()) {
3405 CmpInstr->setDesc(get(NewOpcode));
3406 CmpInstr->RemoveOperand(0);
3418 // CmpInstr is the first instruction of the BB.
3419 MachineBasicBlock::iterator I = CmpInstr, Def = MI;
3422 // EFLAGS. If MI is not in the same BB as CmpInstr, do not optimize.
3424 if (IsCmpZero && (MI->getParent() != CmpInstr->getParent() ||
3428 // We are searching for an earlier instruction that can make CmpInstr
3433 // We iterate backward, starting from the instruction before CmpInstr and
3435 // RI points to the instruction before CmpInstr.
3440 RE = CmpInstr->getParent() == MI->getParent() ?
3442 CmpInstr->getParent()->rend();
3446 // Check whether CmpInstr can be made redundant by the current instruction.
3448 isRedundantFlagInstr(CmpInstr, SrcReg, SrcReg2, CmpValue, Instr)) {
3466 // We can't remove CmpInstr.
3478 // Scan forward from the instruction after CmpInstr for uses of EFLAGS.
3479 // It is safe to remove CmpInstr if EFLAGS is redefined or killed.
3484 MachineBasicBlock::iterator E = CmpInstr->getParent()->end();
3491 // It is safe to remove CmpInstr if EFLAGS is updated again.
3546 // If it is safe to remove CmpInstr, the condition code of these
3551 // It is safe to remove CmpInstr if EFLAGS is updated again or killed.
3560 MachineBasicBlock *MBB = CmpInstr->getParent();
3601 CmpInstr->eraseFromParent();