[llvm] r368856 - [PowerPC][NFC] Consolidate duplicate XX3Form_SetZero and XX3Form_Zero.
Jinsong Ji via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 07:16:27 PDT 2019
Author: jsji
Date: Wed Aug 14 07:16:26 2019
New Revision: 368856
URL: http://llvm.org/viewvc/llvm-project?rev=368856&view=rev
Log:
[PowerPC][NFC] Consolidate duplicate XX3Form_SetZero and XX3Form_Zero.
Rename one to XX3Form_SameOp, remove the other one.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCInstrFormats.td
llvm/trunk/lib/Target/PowerPC/PPCInstrVSX.td
Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrFormats.td?rev=368856&r1=368855&r2=368856&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstrFormats.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrFormats.td Wed Aug 14 07:16:26 2019
@@ -1209,20 +1209,13 @@ class XX3Form<bits<6> opcode, bits<8> xo
let Inst{31} = XT{5};
}
-class XX3Form_Zero<bits<6> opcode, bits<8> xo, dag OOL, dag IOL, string asmstr,
+class XX3Form_SameOp<bits<6> opcode, bits<8> xo, dag OOL, dag IOL, string asmstr,
InstrItinClass itin, list<dag> pattern>
: XX3Form<opcode, xo, OOL, IOL, asmstr, itin, pattern> {
let XA = XT;
let XB = XT;
}
-class XX3Form_SetZero<bits<6> opcode, bits<8> xo, dag OOL, dag IOL, string asmstr,
- InstrItinClass itin, list<dag> pattern>
- : XX3Form<opcode, xo, OOL, IOL, asmstr, itin, pattern> {
- let XB = XT;
- let XA = XT;
-}
-
class XX3Form_1<bits<6> opcode, bits<8> xo, dag OOL, dag IOL, string asmstr,
InstrItinClass itin, list<dag> pattern>
: I<opcode, OOL, IOL, asmstr, itin> {
Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrVSX.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrVSX.td?rev=368856&r1=368855&r2=368856&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstrVSX.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrVSX.td Wed Aug 14 07:16:26 2019
@@ -864,14 +864,14 @@ let Uses = [RM] in {
let isCodeGenOnly = 1, isMoveImm = 1, isAsCheapAsAMove = 1,
isReMaterializable = 1 in {
- def XXLXORz : XX3Form_Zero<60, 154, (outs vsrc:$XT), (ins),
+ def XXLXORz : XX3Form_SameOp<60, 154, (outs vsrc:$XT), (ins),
"xxlxor $XT, $XT, $XT", IIC_VecGeneral,
[(set v4i32:$XT, (v4i32 immAllZerosV))]>;
- def XXLXORdpz : XX3Form_SetZero<60, 154,
+ def XXLXORdpz : XX3Form_SameOp<60, 154,
(outs vsfrc:$XT), (ins),
"xxlxor $XT, $XT, $XT", IIC_VecGeneral,
[(set f64:$XT, (fpimm0))]>;
- def XXLXORspz : XX3Form_SetZero<60, 154,
+ def XXLXORspz : XX3Form_SameOp<60, 154,
(outs vssrc:$XT), (ins),
"xxlxor $XT, $XT, $XT", IIC_VecGeneral,
[(set f32:$XT, (fpimm0))]>;
More information about the llvm-commits
mailing list