This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Upgrade RISC-V V extension MC to v1.0-08a0b46.
AbandonedPublic

Authored by HsiangKai on Dec 19 2020, 2:01 AM.

Details

Summary
  • Update the VTYPE encoding. Make LMUL encoding in a continuous field.
  • Add new instructions in V1.0.
  • Update instruction constraints.
  • Update test cases accordingly.

Diff Detail

Event Timeline

HsiangKai created this revision.Dec 19 2020, 2:01 AM
HsiangKai requested review of this revision.Dec 19 2020, 2:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 19 2020, 2:01 AM
Herald added a subscriber: MaskRay. · View Herald Transcript

Can this be split up? Seems like some of this could be done in independent changes. Like changing LMUL layout. Changing loads. Changing madc.

llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
2310

Why is this being dropped? This was a bug fix I just earlier this week. I don't think vmerge can ever V0 as a destination and the parser previously crashed on it.

Can this be split up? Seems like some of this could be done in independent changes. Like changing LMUL layout. Changing loads. Changing madc.

I will do it.

HsiangKai added inline comments.Dec 20 2020, 2:58 PM
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
2310

I could not find the description that the destination of vmerge could not be V0 as I scanned the V specification. So, I remove it. Maybe I misread the specification. We should confirm it first.

craig.topper added inline comments.Dec 20 2020, 3:12 PM
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
2310

It should be covered by this "The destination vector register group for a masked vector instruction cannot overlap the source mask register (v0), unless the destination vector register is being written with a mask value (e.g., comparisons) or the scalar result of a reduction. Otherwise, an illegal instruction exception is raised.
This constraint supports restart with a non-zero vstart value"

HsiangKai added inline comments.Dec 20 2020, 3:17 PM
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
2310

Got it. Thanks. I will revert it.

khchen added a subscriber: khchen.Dec 20 2020, 7:37 PM
HsiangKai abandoned this revision.Dec 20 2020, 11:27 PM

Split this commit into D93611, D93612, D93613, D93614.

llvm/test/MC/RISCV/rvv/vsetvl.s