This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add merge operands to more RISCVISD::*_VL opcodes.
ClosedPublic

Authored by craig.topper on Jul 29 2022, 8:15 PM.

Details

Summary

This adds a merge operand to all of the binary _VL nodes. Including
integer and widening. They all share multiclasses in tablegen
so doing them all at once was easiest.

I plan to use FADD_VL in an upcoming patch. The rest are just for
consistency to keep tablegen working.

This does reduce the isel table size by about 25k so that's nice.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 29 2022, 8:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2022, 8:15 PM
craig.topper requested review of this revision.Jul 29 2022, 8:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2022, 8:15 PM
reames accepted this revision.Jul 30 2022, 8:02 AM

LGTM. Idea makes sense, optional comments.

llvm/lib/Target/RISCV/RISCVISelLowering.h
216

This is a purely stylistic comment - but I find the placement of merge between mask and VL slightly surprising. Would it be easy to make the order merge, mask, VL? This would keep this matching the MI operand order as much as possible while still obeying the commutative restriction to not have merge first in the sequence.

251

I think you meant unary not FMA here right?

This revision is now accepted and ready to land.Jul 30 2022, 8:02 AM

Reorder operands as requested.
Fix comment