This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Pre-promote v1i1/v2i1/v4i1->i1/i2/i4 bitcasts before type legalization
ClosedPublic

Authored by craig.topper on Jun 17 2022, 2:32 PM.

Details

Summary

Type legalization will convert the bitcast into a vector store and
scalar load.

Instead this patch widens the vector to v8i1 with undef, and bitcasts
it to i8. v8i1->i8 has custom handling for type legalization already to
bitcast to a v1i8 vector and use an extract_element.

The code here was lifted from X86's avx512 support.

Diff Detail

Event Timeline

craig.topper created this revision.Jun 17 2022, 2:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2022, 2:32 PM
craig.topper requested review of this revision.Jun 17 2022, 2:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2022, 2:32 PM
reames accepted this revision.Jun 17 2022, 3:13 PM

LGTM

This revision is now accepted and ready to land.Jun 17 2022, 3:13 PM
This revision was landed with ongoing or failed builds.Jun 18 2022, 11:16 AM
This revision was automatically updated to reflect the committed changes.