Tighten up checks

llvm-svn: 11274
This commit is contained in:
Chris Lattner 2004-02-10 20:25:13 +00:00
parent 2711c12f48
commit 259e98ed27
1 changed files with 2 additions and 2 deletions

View File

@ -42,8 +42,8 @@ bool X86InstrInfo::isNOPinstr(const MachineInstr &MI) const {
// Make sure the instruction is EXACTLY `xchg ax, ax'
if (MI.getOpcode() == X86::XCHGrr16) {
const MachineOperand &op0 = MI.getOperand(0), &op1 = MI.getOperand(1);
if (op0.isMachineRegister() && op0.getMachineRegNum() == X86::AX &&
op1.isMachineRegister() && op1.getMachineRegNum() == X86::AX) {
if (op0.isPhysicalRegister() && op0.getReg() == X86::AX &&
op1.isPhysicalRegister() && op1.getReg() == X86::AX) {
return true;
}
}