This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Cleanup instruction formats used for B extension ternary operations.
ClosedPublic

Authored by craig.topper on Apr 13 2021, 4:54 PM.

Details

Summary

Rename RVInstR4 as used by F/D/Zfh extensions to RVInstR4Frm.
Introduce new RVInstR4 that takes funct3 as a parameter.

Add new format classes for FSRI and FSRIW instead of trying to
bend RVInstR4 to use a shamt overlayed on rs2 and funct2.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 13 2021, 4:54 PM
craig.topper requested review of this revision.Apr 13 2021, 4:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2021, 4:54 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
Jim added inline comments.Apr 13 2021, 7:21 PM
llvm/lib/Target/RISCV/RISCVInstrFormats.td
257
llvm/lib/Target/RISCV/RISCVInstrInfoD.td
36
llvm/lib/Target/RISCV/RISCVInstrInfoF.td
54
llvm/lib/Target/RISCV/RISCVInstrInfoZfh.td
38

Fix formatting

frasercrmck accepted this revision.May 6 2021, 8:15 AM

LGTM. I think this is an improvement over the weird interaction of shamt and funct2 we had in RVBTernaryImm6 before.

This revision is now accepted and ready to land.May 6 2021, 8:15 AM
This revision was landed with ongoing or failed builds.May 6 2021, 9:07 AM
This revision was automatically updated to reflect the committed changes.