Page MenuHomePhabricator

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

Authored by craig.topper on Tue, Apr 13, 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.Tue, Apr 13, 4:54 PM
craig.topper requested review of this revision.Tue, Apr 13, 4:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Apr 13, 4:54 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
Jim added inline comments.Tue, Apr 13, 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.Thu, May 6, 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.Thu, May 6, 8:15 AM
This revision was landed with ongoing or failed builds.Thu, May 6, 9:07 AM
This revision was automatically updated to reflect the committed changes.