This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Fold vmv.v.v across different subregister classes
AbandonedPublic

Authored by luke on Jun 20 2023, 7:59 AM.

Details

Summary

A common pattern is that a vector op will be copied into a smaller subregister
class and then inserted into another vector with vmv.v.v. This extends the
vmv.v.v combine to handle such cases by peeking through the COPY_TO_REGCLASS
nodes and updating the result type.

Diff Detail

Event Timeline

luke created this revision.Jun 20 2023, 7:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 7:59 AM
luke requested review of this revision.Jun 20 2023, 7:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 7:59 AM

I think this is now ready to be rebased over the reworked and merged transform.

One thing to make sure of - we need the new passthru operand - previous "False" in the in-tree code, to be the same subreg class as the true after stripping off the COPY_TO_REGCLASS. We also need to know that VL is within the smaller reg class. I don't think the current patch checks either of these, directly. (they might be implied by some non-obvious reasoning, haven't thought about it too hard.)