This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Make all vector binops use the _TU pseudo form
ClosedPublic

Authored by reames on Jun 14 2023, 11:10 AM.

Details

Summary

This continues towards the goal spelled out in https://discourse.llvm.org/t/riscv-transition-in-vector-pseudo-structure-policy-variants/71295. This patch switches all the binary operations (no widen, no narrow, but both int and FP) to use the _TU + implicit_def passthrough form.

Change is mechanical, but I want a second set of eyes on the test diffs. I see mostly minor improvements and scheduling changes.

Note: This only changes the unmasked variants. Masked variants will still go through doPeepholeMaskedRVV and end up in the unsuffixed/TA form. Fixing that will be a separate change.

Diff Detail

Event Timeline

reames created this revision.Jun 14 2023, 11:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2023, 11:10 AM
reames requested review of this revision.Jun 14 2023, 11:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2023, 11:10 AM
reames planned changes to this revision.Jun 15 2023, 9:36 AM

Noticed this set of _TUs is one of the ones *without* a policy operand, need to fix that first.

reames requested review of this revision.Jun 15 2023, 12:18 PM

Noticed this set of _TUs is one of the ones *without* a policy operand, need to fix that first.

Actually, no, I don't. This patch is fine. At the moment, we're only using _TU for either "tail undisturbed" or "tail undefined". Given that, the lack of the policy flag isn't a problem - the pass through operand tells us which is which. It will be once we start forming "tail agnostic" instances, but that's another patch, and I can group the policy operand addition with the consumer who needs it.

This revision is now accepted and ready to land.Jun 16 2023, 11:21 AM
craig.topper requested changes to this revision.Jun 16 2023, 11:22 AM
craig.topper added inline comments.
llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
91

This should be result_type

115

result_type

166

result_type

This revision now requires changes to proceed.Jun 16 2023, 11:22 AM
reames updated this revision to Diff 532309.Jun 16 2023, 3:38 PM
reames edited the summary of this revision. (Show Details)

Address review comments.

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