This patch added the MC layer support of P extension.
Authored-by: Shao-Ce Sun
Co-Authored-by: StephenFan
Paths
| Differential D94579
[RISCV] add the MC layer support of P extension AbandonedPublic Authored by achieveartificialintelligence on Jan 12 2021, 7:38 PM.
Details Summary This patch added the MC layer support of P extension. Authored-by: Shao-Ce Sun
Diff Detail Event TimelineHerald added subscribers: frasercrmck, NickHung, evandro and 24 others. · View Herald TranscriptJan 12 2021, 7:38 PM Comment Actions Please make sure there are tests for invalid instructions (especially checking you have the immediate ranges and predicates correct). I have not looked at the draft P spec so these are all shallow comments from glancing over the diff.
Comment Actions It seems lack of invalid operand handling for new added operand (uimm3, uimm4) in AsmParser/RISCVAsmParser.cpp:MatchAndEmitInstruction.
achieveartificialintelligence marked 12 inline comments as done. Comment Actions Thanks for submitting this. It doesn't apply against current HEAD, could you please rebase? One minor request before reviewing in detail - could you please confirm the version of the spec this is meant to implement? Is it 0.9.1 at https://github.com/riscv/riscv-p-spec/blob/master/P-ext-proposal.adoc#revision-history ? It would also be good to indicate this version number in RISCVInstrInfoP.td just as we do for RISCVInstrInfoB.td. Comment Actions The registers used in most 'P' instruction should have v4i8 and v2i16 types for RV32 or v8i8 and v4i16 for RV64.
Comment Actions Per our discussion in the RISC-V community call today, this patch is intended as more of a "request for comment" at this stage given the P extension encoding issues, and PLCT Lab + Andes are going to reach out to each other to try to coordinate these MC layer and future codegen patches (thanks!).
Revision Contents
Diff 317779 llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
llvm/lib/Target/RISCV/RISCV.td
llvm/lib/Target/RISCV/RISCVInstrFormats.td
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.td
llvm/lib/Target/RISCV/RISCVInstrInfoP.td
llvm/lib/Target/RISCV/RISCVRegisterInfo.td
llvm/lib/Target/RISCV/RISCVSchedRocket.td
llvm/lib/Target/RISCV/RISCVSchedSiFive7.td
llvm/lib/Target/RISCV/RISCVSubtarget.h
llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h
llvm/test/MC/RISCV/rv32p-invalid.s
llvm/test/MC/RISCV/rv32p-valid.s
llvm/test/MC/RISCV/rv64p-invalid.s
llvm/test/MC/RISCV/rv64p-valid.s
|
"SIMD Instructions" would be most consistent with what's already here (though the V-related extensions have names that aren't so consistent with that) IMO, though the P working group should probably come up with a better name than SIMD in order to distinguish themselves from V (with P being traditional vectorisation and V being new-fangled scalable vectorisation).