From: Chris Lattner Date: Sat, 18 Nov 2006 01:23:56 +0000 (+0000) Subject: Pretty print 'rldicr r2, r2, 2, 61' as 'sldi r2, r2, 2'. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=566c1b1a0442ccbf9f52b176dbca9764d94e5f93;p=oota-llvm.git Pretty print 'rldicr r2, r2, 2, 61' as 'sldi r2, r2, 2'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31838 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 29a01a349a3..7ac423348ab 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -438,6 +438,18 @@ void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) { O << "\n"; return; } + } else if (MI->getOpcode() == PPC::RLDICR) { + unsigned char SH = MI->getOperand(2).getImmedValue(); + unsigned char ME = MI->getOperand(3).getImmedValue(); + // rldicr RA, RS, SH, 63-SH == sldi RA, RS, SH + if (63-SH == ME) { + O << "sldi "; + printOperand(MI, 0); + O << ", "; + printOperand(MI, 1); + O << ", " << (unsigned int)SH << "\n"; + return; + } } if (printInstruction(MI))