This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Fold (sra (sext_inreg (shl X, C1), i32), C2) -> (sra (shl X, C1+32), C2+32).
ClosedPublic

Authored by craig.topper on Jul 13 2022, 12:54 PM.

Details

Summary

The former pattern will select as slliw+sraiw while the latter
will select as slli+srai. This can enable the slli+srai to be
compressed.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 13 2022, 12:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2022, 12:54 PM
craig.topper requested review of this revision.Jul 13 2022, 12:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2022, 12:54 PM
asb accepted this revision.Jul 13 2022, 1:55 PM

LGTM.

This revision is now accepted and ready to land.Jul 13 2022, 1:55 PM
This revision was landed with ongoing or failed builds.Jul 13 2022, 2:34 PM
This revision was automatically updated to reflect the committed changes.