From: Brian Gaeke Date: Wed, 29 Sep 2004 03:28:15 +0000 (+0000) Subject: Fix bug recognizing moves: isMoveInstr should only treat ORs with %g0 as X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9b8ed0e04aa2c2f18e39a4556006e08174c2eda1;p=oota-llvm.git Fix bug recognizing moves: isMoveInstr should only treat ORs with %g0 as moves, not all ORs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16576 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Sparc/SparcInstrInfo.cpp b/lib/Target/Sparc/SparcInstrInfo.cpp index 64e225faf21..7776b0bae3c 100644 --- a/lib/Target/Sparc/SparcInstrInfo.cpp +++ b/lib/Target/Sparc/SparcInstrInfo.cpp @@ -30,8 +30,8 @@ bool SparcV8InstrInfo::isMoveInstr(const MachineInstr &MI, if (MI.getOperand(1).getReg() == V8::G0) { // X = or G0, Y -> X = Y DstReg = MI.getOperand(0).getReg(); SrcReg = MI.getOperand(2).getReg(); + return true; } - return true; } else if (MI.getOpcode() == V8::FMOVS) { SrcReg = MI.getOperand(1).getReg(); DstReg = MI.getOperand(0).getReg(); diff --git a/lib/Target/SparcV8/SparcV8InstrInfo.cpp b/lib/Target/SparcV8/SparcV8InstrInfo.cpp index 64e225faf21..7776b0bae3c 100644 --- a/lib/Target/SparcV8/SparcV8InstrInfo.cpp +++ b/lib/Target/SparcV8/SparcV8InstrInfo.cpp @@ -30,8 +30,8 @@ bool SparcV8InstrInfo::isMoveInstr(const MachineInstr &MI, if (MI.getOperand(1).getReg() == V8::G0) { // X = or G0, Y -> X = Y DstReg = MI.getOperand(0).getReg(); SrcReg = MI.getOperand(2).getReg(); + return true; } - return true; } else if (MI.getOpcode() == V8::FMOVS) { SrcReg = MI.getOperand(1).getReg(); DstReg = MI.getOperand(0).getReg();