This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Lower reverse shuffles of fixed i1 vectors to vbrev.v
ClosedPublic

Authored by luke on Aug 10 2023, 6:49 AM.

Details

Summary

If we can fit an entire vector of i1 into a single element, e.g. v32i1 ->
v1i32, then we can reverse it via vbrev.v.
We need to handle the case where the vector doesn't exactly fit into the larger
element type, e.g. v4i1 -> v1i8. In this case we shift up the reversed bits
afterwards.

Diff Detail

Event Timeline

luke created this revision.Aug 10 2023, 6:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2023, 6:49 AM
luke requested review of this revision.Aug 10 2023, 6:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2023, 6:49 AM
luke updated this revision to Diff 549027.Aug 10 2023, 6:55 AM

Fix filecheck prefixes

4vtomat accepted this revision.Aug 11 2023, 8:44 PM

LGTM, but leave final decision to other reviewers~

This revision is now accepted and ready to land.Aug 11 2023, 8:44 PM

LGTM w/minor request. Can you add a test for a 128xi1? (Or some other illegal type.) Pretty sure it's just going to get split, but be good to have some bit of coverage for that.

This revision was landed with ongoing or failed builds.Aug 14 2023, 8:37 AM
This revision was automatically updated to reflect the committed changes.