[PATCH] D80502: [NFC][PowerPC] Remove the redundant InstAlias for OR instruction
Zhang Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 24 18:39:31 PDT 2020
ZhangKang created this revision.
ZhangKang added reviewers: hfinkel, efriedma, PowerPC, jsji, nemanjai, steven.zhang.
ZhangKang added a project: LLVM.
Herald added subscribers: shchenz, wuzish, hiraditya.
We have handle the InstAlias for OR instructions, but we handle it agagin in `PPCInstPrinter.cpp`.
We can add some InstAlias in `PPCInstPrinter.cpp` when we can't handle it in td files. But it's obvious that we can handle or
in td files and we have done it.
PPCInstr64Bit.td:930:def : InstAlias<"mr $rA, $rB", (OR8 g8rc:$rA, g8rc:$rB, g8rc:$rB)>;
PPCInstr64Bit.td:931:def : InstAlias<"mr. $rA, $rB", (OR8_rec g8rc:$rA, g8rc:$rB, g8rc:$rB)>;
PPCInstrInfo.td:2488:def : InstAlias<"mr $rA, $rB", (OR gprc:$rA, gprc:$rB, gprc:$rB)>;
PPCInstrInfo.td:2489:def : InstAlias<"mr. $rA, $rB", (OR_rec gprc:$rA, gprc:$rB, gprc:$rB)>;
We should remove the redundant for OR in `PPCInstPrinter.cpp`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80502
Files:
llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
Index: llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
===================================================================
--- llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
+++ llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
@@ -116,16 +116,6 @@
}
}
- if ((MI->getOpcode() == PPC::OR || MI->getOpcode() == PPC::OR8) &&
- MI->getOperand(1).getReg() == MI->getOperand(2).getReg()) {
- O << "\tmr ";
- printOperand(MI, 0, O);
- O << ", ";
- printOperand(MI, 1, O);
- printAnnotation(O, Annot);
- return;
- }
-
if (MI->getOpcode() == PPC::RLDICR ||
MI->getOpcode() == PPC::RLDICR_32) {
unsigned char SH = MI->getOperand(2).getImm();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80502.265955.patch
Type: text/x-patch
Size: 705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200525/e90c4dfb/attachment-0001.bin>
More information about the llvm-commits
mailing list