Tighten up some checks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24817 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-12-18 06:40:34 +00:00
parent bd2b621486
commit abfc2a7363
2 changed files with 2 additions and 10 deletions

View File

@ -45,11 +45,7 @@ bool SparcV8InstrInfo::isMoveInstr(const MachineInstr &MI,
return true;
}
} else if (MI.getOpcode() == V8::ORri || MI.getOpcode() == V8::ADDri) {
if (isZeroImmed (MI.getOperand (1))) {
DstReg = MI.getOperand(0).getReg();
SrcReg = MI.getOperand(2).getReg();
return true;
} else if (isZeroImmed (MI.getOperand (2))) {
if (isZeroImmed(MI.getOperand(2)) && MI.getOperand(1).isRegister()) {
DstReg = MI.getOperand(0).getReg();
SrcReg = MI.getOperand(1).getReg();
return true;

View File

@ -45,11 +45,7 @@ bool SparcV8InstrInfo::isMoveInstr(const MachineInstr &MI,
return true;
}
} else if (MI.getOpcode() == V8::ORri || MI.getOpcode() == V8::ADDri) {
if (isZeroImmed (MI.getOperand (1))) {
DstReg = MI.getOperand(0).getReg();
SrcReg = MI.getOperand(2).getReg();
return true;
} else if (isZeroImmed (MI.getOperand (2))) {
if (isZeroImmed(MI.getOperand(2)) && MI.getOperand(1).isRegister()) {
DstReg = MI.getOperand(0).getReg();
SrcReg = MI.getOperand(1).getReg();
return true;