[PATCH] D137808: [RISCV] Add OPCFG format and use it for vsetvli. NFC
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 17:22:55 PST 2022
craig.topper created this revision.
craig.topper added reviewers: reames, kito-cheng, JojoR.
Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
Based on D137694 <https://reviews.llvm.org/D137694> and extended
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137808
Files:
llvm/lib/Target/RISCV/RISCVInstrFormatsV.td
Index: llvm/lib/Target/RISCV/RISCVInstrFormatsV.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrFormatsV.td
+++ llvm/lib/Target/RISCV/RISCVInstrFormatsV.td
@@ -20,6 +20,7 @@
def OPIVX : RISCVVFormat<0b100>;
def OPFVF : RISCVVFormat<0b101>;
def OPMVX : RISCVVFormat<0b110>;
+def OPCFG : RISCVVFormat<0b111>;
class RISCVMOP<bits<2> val> {
bits<2> Value = val;
@@ -63,7 +64,7 @@
let Inst{30} = 1;
let Inst{29-20} = vtypei{9-0};
let Inst{19-15} = uimm;
- let Inst{14-12} = 0b111;
+ let Inst{14-12} = OPCFG.Value;
let Inst{11-7} = rd;
let Opcode = OPC_OP_V.Value;
@@ -79,7 +80,7 @@
let Inst{31} = 0;
let Inst{30-20} = vtypei;
let Inst{19-15} = rs1;
- let Inst{14-12} = 0b111;
+ let Inst{14-12} = OPCFG.Value;
let Inst{11-7} = rd;
let Opcode = OPC_OP_V.Value;
@@ -96,7 +97,7 @@
let Inst{30-25} = 0b000000;
let Inst{24-20} = rs2;
let Inst{19-15} = rs1;
- let Inst{14-12} = 0b111;
+ let Inst{14-12} = OPCFG.Value;
let Inst{11-7} = rd;
let Opcode = OPC_OP_V.Value;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137808.474638.patch
Type: text/x-patch
Size: 1081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221111/123bea91/attachment.bin>
More information about the llvm-commits
mailing list