diff options
author | Jinsong Ji <jji@us.ibm.com> | 2019-08-14 14:16:26 +0000 |
---|---|---|
committer | Jinsong Ji <jji@us.ibm.com> | 2019-08-14 14:16:26 +0000 |
commit | e71db6584d8d8936c667c14c06b87382f5327e58 (patch) | |
tree | 4c2b78ce364b41ec290b765cfb15552acaa07d53 /llvm/lib/Target | |
parent | 8fc095d453a05646e5f96df613152cf1212ef0db (diff) | |
download | bcm5719-llvm-e71db6584d8d8936c667c14c06b87382f5327e58.tar.gz bcm5719-llvm-e71db6584d8d8936c667c14c06b87382f5327e58.zip |
[PowerPC][NFC] Consolidate duplicate XX3Form_SetZero and XX3Form_Zero.
Rename one to XX3Form_SameOp, remove the other one.
llvm-svn: 368856
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrFormats.td | 9 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrVSX.td | 6 |
2 files changed, 4 insertions, 11 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrFormats.td b/llvm/lib/Target/PowerPC/PPCInstrFormats.td index a48eb169069..96b9c9a119c 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrFormats.td +++ b/llvm/lib/Target/PowerPC/PPCInstrFormats.td @@ -1209,20 +1209,13 @@ class XX3Form<bits<6> opcode, bits<8> xo, dag OOL, dag IOL, string asmstr, 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> { diff --git a/llvm/lib/Target/PowerPC/PPCInstrVSX.td b/llvm/lib/Target/PowerPC/PPCInstrVSX.td index b31cdee388d..c144a28d553 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrVSX.td +++ b/llvm/lib/Target/PowerPC/PPCInstrVSX.td @@ -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))]>; |