This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] matchBSwapOrBitReverse - remove pattern matching early-out. NFCI.
ClosedPublic

Authored by RKSimon on Feb 19 2021, 8:17 AM.

Details

Summary

recognizeBSwapOrBitReverseIdiom + collectBitParts have pattern matching to bail if a bswap/bitreverse pattern isn't possible - we should be able to rely on this instead.

This is part of a cleanup towards letting matchBSwapOrBitReverse /recognizeBSwapOrBitReverseIdiom use 'root' instructions that aren't ORs (FSHL/FSHRs in particular which can be prematurely created).

Diff Detail

Event Timeline

RKSimon created this revision.Feb 19 2021, 8:17 AM
RKSimon requested review of this revision.Feb 19 2021, 8:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2021, 8:17 AM
nikic accepted this revision.Feb 19 2021, 1:35 PM

LGTM. Don't see any compile-time impact from removing the early exit.

This revision is now accepted and ready to land.Feb 19 2021, 1:35 PM
This revision was landed with ongoing or failed builds.Feb 20 2021, 5:15 AM
This revision was automatically updated to reflect the committed changes.