Lines Matching defs:CmpInstr

1041 static bool findRedundantFlagInstr(MachineInstr &CmpInstr,
1048 CmpInstr.getOpcode() == X86::TEST64rr) &&
1050 CmpInstr.getOpcode() == X86::TEST16rr))
1053 // CmpInstr is a TEST16rr/TEST64rr instruction, and
1056 assert((CmpInstr.getOperand(0).getReg() == CmpInstr.getOperand(1).getReg()) &&
1057 "CmpInstr is an analyzable TEST16rr/TEST64rr, and "
1062 // `CmpValDefInstr` defines the value that's used by `CmpInstr`; in this case
1063 // if `CmpValDefInstr` sets the EFLAGS, it is likely that `CmpInstr` is
1066 (MRI->getVRegDef(CmpInstr.getOperand(0).getReg()) == &CmpValDefInstr) &&
1070 if (CmpInstr.getOpcode() == X86::TEST16rr) {
1085 if (CmpInstr.getOpcode() == X86::TEST64rr) {
5203 bool X86InstrInfo::optimizeCompareInstr(MachineInstr &CmpInstr, Register SrcReg,
5208 switch (CmpInstr.getOpcode()) {
5223 if (!MRI->use_nodbg_empty(CmpInstr.getOperand(0).getReg()))
5230 switch (CmpInstr.getOpcode()) {
5247 CmpInstr.setDesc(get(NewOpcode));
5248 CmpInstr.removeOperand(0);
5250 CmpInstr.dropDebugNumber();
5279 // Search backward from CmpInstr for the next instruction defining EFLAGS.
5281 MachineBasicBlock &CmpMBB = *CmpInstr.getParent();
5283 std::next(MachineBasicBlock::reverse_iterator(CmpInstr));
5312 findRedundantFlagInstr(CmpInstr, Inst, MRI, &AndInstr, TRI,
5345 if (isRedundantFlagInstr(CmpInstr, SrcReg, SrcReg2, CmpMask, CmpValue,
5376 // Scan forward from the instruction after CmpInstr for uses of EFLAGS.
5377 // It is safe to remove CmpInstr if EFLAGS is redefined or killed.
5383 std::next(MachineBasicBlock::iterator(CmpInstr));
5389 // It is safe to remove CmpInstr if EFLAGS is updated again.
5510 // If it is safe to remove CmpInstr, the condition code of these
5515 // It is safe to remove CmpInstr if EFLAGS is updated again or killed.
5562 CmpInstr.eraseFromParent();