Lines Matching refs:CmpInstr

3158 optimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg, unsigned SrcReg2,
3163 switch (CmpInstr->getOpcode()) {
3180 if (!MRI->use_nodbg_empty(CmpInstr->getOperand(0).getReg()))
3183 switch (CmpInstr->getOpcode()) {
3201 CmpInstr->setDesc(get(NewOpcode));
3202 CmpInstr->RemoveOperand(0);
3214 // CmpInstr is the first instruction of the BB.
3215 MachineBasicBlock::iterator I = CmpInstr, Def = MI;
3218 // EFLAGS. If MI is not in the same BB as CmpInstr, do not optimize.
3220 if (IsCmpZero && (MI->getParent() != CmpInstr->getParent() ||
3224 // We are searching for an earlier instruction that can make CmpInstr
3229 // We iterate backward, starting from the instruction before CmpInstr and
3231 // RI points to the instruction before CmpInstr.
3236 RE = CmpInstr->getParent() == MI->getParent() ?
3238 CmpInstr->getParent()->rend();
3242 // Check whether CmpInstr can be made redundant by the current instruction.
3244 isRedundantFlagInstr(CmpInstr, SrcReg, SrcReg2, CmpValue, Instr)) {
3265 // We can't remove CmpInstr.
3277 // Scan forward from the instruction after CmpInstr for uses of EFLAGS.
3278 // It is safe to remove CmpInstr if EFLAGS is redefined or killed.
3283 MachineBasicBlock::iterator E = CmpInstr->getParent()->end();
3290 // It is safe to remove CmpInstr if EFLAGS is updated again.
3345 // If it is safe to remove CmpInstr, the condition code of these
3350 // It is safe to remove CmpInstr if EFLAGS is updated again or killed.
3359 MachineBasicBlock *MBB = CmpInstr->getParent();
3380 CmpInstr->eraseFromParent();