[llvm] r208781 - ARM64: remove unneeded InstPrinter hacks
Tim Northover
tnorthover at apple.com
Wed May 14 07:44:19 PDT 2014
Author: tnorthover
Date: Wed May 14 09:44:18 2014
New Revision: 208781
URL: http://llvm.org/viewvc/llvm-project?rev=208781&view=rev
Log:
ARM64: remove unneeded InstPrinter hacks
Now that TableGen handles aliases, these are unneeded. Hopefully more will be
able to go soon.
Modified:
llvm/trunk/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
Modified: llvm/trunk/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp?rev=208781&r1=208780&r2=208781&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp Wed May 14 09:44:18 2014
@@ -301,38 +301,6 @@ void ARM64InstPrinter::printInst(const M
printExtend(MI, 3, O);
return;
}
- // ADD WSP, Wn, #0 ==> MOV WSP, Wn
- if (Opcode == ARM64::ADDWri && (MI->getOperand(0).getReg() == ARM64::WSP ||
- MI->getOperand(1).getReg() == ARM64::WSP) &&
- MI->getOperand(2).getImm() == 0 &&
- ARM64_AM::getShiftValue(MI->getOperand(3).getImm()) == 0) {
- O << "\tmov\t" << getRegisterName(MI->getOperand(0).getReg())
- << ", " << getRegisterName(MI->getOperand(1).getReg());
- return;
- }
- // ADD XSP, Wn, #0 ==> MOV XSP, Wn
- if (Opcode == ARM64::ADDXri && (MI->getOperand(0).getReg() == ARM64::SP ||
- MI->getOperand(1).getReg() == ARM64::SP) &&
- MI->getOperand(2).getImm() == 0 &&
- ARM64_AM::getShiftValue(MI->getOperand(3).getImm()) == 0) {
- O << "\tmov\t" << getRegisterName(MI->getOperand(0).getReg())
- << ", " << getRegisterName(MI->getOperand(1).getReg());
- return;
- }
- // ORR Wn, WZR, Wm ==> MOV Wn, Wm
- if (Opcode == ARM64::ORRWrs && MI->getOperand(1).getReg() == ARM64::WZR &&
- MI->getOperand(3).getImm() == 0) {
- O << "\tmov\t" << getRegisterName(MI->getOperand(0).getReg())
- << ", " << getRegisterName(MI->getOperand(2).getReg());
- return;
- }
- // ORR Xn, XZR, Xm ==> MOV Xn, Xm
- if (Opcode == ARM64::ORRXrs && MI->getOperand(1).getReg() == ARM64::XZR &&
- MI->getOperand(3).getImm() == 0) {
- O << "\tmov\t" << getRegisterName(MI->getOperand(0).getReg())
- << ", " << getRegisterName(MI->getOperand(2).getReg());
- return;
- }
if (!printAliasInstr(MI, O))
printInstruction(MI, O);
More information about the llvm-commits
mailing list