diff options
author | Chris Lattner <sabre@nondot.org> | 2005-12-18 06:40:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-12-18 06:40:34 +0000 |
commit | abfc2a73637a73ac6a9d2404ba1936c0fb6e64de (patch) | |
tree | 1526c70d97c72526abff79efca4b22f056068a85 /lib/Target/Sparc/SparcInstrInfo.cpp | |
parent | bd2b6214862ccc33d3bb63005faa15c16ee51c49 (diff) |
Tighten up some checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc/SparcInstrInfo.cpp')
-rw-r--r-- | lib/Target/Sparc/SparcInstrInfo.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Target/Sparc/SparcInstrInfo.cpp b/lib/Target/Sparc/SparcInstrInfo.cpp index a5f5c1da9c..d63be35ca7 100644 --- a/lib/Target/Sparc/SparcInstrInfo.cpp +++ b/lib/Target/Sparc/SparcInstrInfo.cpp @@ -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; |