This is an archive of the discontinued LLVM Phabricator instance.

[XCore] Add instruction pattern for bitrev
ClosedPublic

Authored by Jim on Feb 17 2020, 6:10 PM.

Details

Summary

Add support for lowering bitreverse to the bitrev instruction.
Fix https://bugs.llvm.org/show_bug.cgi?id=34628.

Diff Detail

Event Timeline

Jim created this revision.Feb 17 2020, 6:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2020, 6:10 PM
RKSimon added inline comments.Feb 18 2020, 5:35 AM
llvm/lib/Target/XCore/XCoreInstrInfo.td
892

Should you remove int_xcore_bitrev and use bitreverse directly? AFAICT xcore does this in LowerINTRINSIC_WO_CHAIN for crc8?

Jim marked an inline comment as done.Feb 18 2020, 7:07 PM
Jim added inline comments.
llvm/lib/Target/XCore/XCoreInstrInfo.td
892

int_xcore_bitrev (intrinsic node from llvm.xcore.bitrev) has to be matched bitrev instruction.
It looks like unable to be removed.

RKSimon accepted this revision.EditedFeb 20 2020, 4:26 AM

OK, in which case lets go with this

This revision is now accepted and ready to land.Feb 20 2020, 4:26 AM
This revision was automatically updated to reflect the committed changes.