This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add a policy operand to VPseudoBinaryNoMaskTU [NFC]
ClosedPublic

Authored by reames on Jun 15 2023, 12:37 PM.

Details

Summary

This change adds a policy operand to the helper class which is used for binary ops like vadd, but also, possibly surprisingly, some of the vslide variants. This allows us to represent the tail agnostic state with this pseudo family - previously, we could only represent tail undefined and tail undisturbed. (Since these don't have a mask, they're always mask undefined.)

This is NFC because no current producer uses the tail agnostic state. This will change in an upcoming change to doPeepholeMaskedRVV.

Diff Detail

Event Timeline

reames created this revision.Jun 15 2023, 12:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 12:37 PM
reames requested review of this revision.Jun 15 2023, 12:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 12:37 PM
craig.topper accepted this revision.Jun 16 2023, 11:55 AM

LGTM

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
44

Are we eventually going to delete TAIL_UNDISTURBED_MASK_UNDISTURBED?

This revision is now accepted and ready to land.Jun 16 2023, 11:55 AM
This revision was landed with ongoing or failed builds.Jun 16 2023, 4:47 PM
This revision was automatically updated to reflect the committed changes.

From the perspective of eliminating redundancy, are you planning to eliminate those unmasked TA templates (most of them with names of ...NoMask)? Those Pseudo instructions can also share the extra operand you have added here.

From the perspective of eliminating redundancy, are you planning to eliminate those unmasked TA templates (most of them with names of ...NoMask)? Those Pseudo instructions can also share the extra operand you have added here.

Yes. I've got a change (https://reviews.llvm.org/D153155) which shows the basic structure of a merge. Once that's approved, I plan to do unary and binary ops next.