This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombine] add tests for bitreverse-shift optimization
ClosedPublic

Authored by Chenbing.Zheng on Mar 11 2022, 7:39 PM.

Details

Summary

This patch add some tests to show some optimization opportunities for bitreverse-shift.

Diff Detail

Event Timeline

Chenbing.Zheng created this revision.Mar 11 2022, 7:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2022, 7:39 PM
Chenbing.Zheng requested review of this revision.Mar 11 2022, 7:39 PM
Chenbing.Zheng retitled this revision from [DAGCombine] precommit tests for fold (bitreverse(srl (bitreverse c), x)) -> (shl c, x) to [DAGCombine] add tests for bitreverse-shift optimization.
Chenbing.Zheng edited the summary of this revision. (Show Details)
Chenbing.Zheng added a reviewer: spatel.
RKSimon added inline comments.Mar 29 2022, 12:50 AM
llvm/test/CodeGen/X86/combine-bitreverse.ll
213

Please can you add a i64 test case - to see how well the 32-bit codegen works?

address comment

RKSimon accepted this revision.Mar 29 2022, 2:41 AM

LGTM

This revision is now accepted and ready to land.Mar 29 2022, 2:41 AM
This revision was landed with ongoing or failed builds.Mar 29 2022, 6:57 PM
This revision was automatically updated to reflect the committed changes.