This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add VFCVT pseudos with no mask
ClosedPublic

Authored by luke on Jun 30 2023, 2:53 PM.

Details

Summary

When emitting a vfcvt with a rounding mode, we end up generating an unnecessary
vmset because the only rounding mode pseudos have a mask operand. This patch
adds a pseudo without a mask, and marks the masked variant with the
MaskedPseudo class so the doPeepholeMergeVMV optimisation knows to remove the
redundant vmset.

Diff Detail

Event Timeline

luke created this revision.Jun 30 2023, 2:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2023, 2:53 PM
luke requested review of this revision.Jun 30 2023, 2:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2023, 2:53 PM
craig.topper added inline comments.Jul 3 2023, 2:56 PM
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
1058

I'm not sure GetVRegNoV0 is needed here?

luke updated this revision to Diff 536911.Jul 3 2023, 3:51 PM

Use just regular RegClass instead of GetVRegNoV0

luke marked an inline comment as done.Jul 3 2023, 3:51 PM
reames accepted this revision.Jul 5 2023, 7:51 AM

LGTM

This revision is now accepted and ready to land.Jul 5 2023, 7:51 AM
This revision was automatically updated to reflect the committed changes.