Page MenuHomePhabricator

[RISCV] Custom type legalize i32 bswap/bitreverse to GREVIW on RV64 with Zbp extension

Authored by craig.topper on Nov 13 2020, 1:07 PM.



Currently we require a sra to pattern match these properly in isel. If the consumer didn't need the result sign extended we'll have an srl instead of sra and fail to match.

This patch switches to custom legalizing to GREVIW using portions of D91259.

Diff Detail

Event Timeline

craig.topper created this revision.Nov 13 2020, 1:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2020, 1:07 PM
craig.topper requested review of this revision.Nov 13 2020, 1:07 PM
This revision is now accepted and ready to land.Nov 20 2020, 1:30 AM