This is an archive of the discontinued LLVM Phabricator instance.

[APInt] Add unsigned overloads of shift functions
ClosedPublic

Authored by foad on May 25 2023, 4:07 AM.

Details

Summary

Add overloads of sshl_ov, ushl_ov, sshl_sat and ushl_sat that take the
shift amount as unsigned instead of APInt. This matches what we do for
the normal shift operators and can help to avoid creating temporary
APInts in some cases.

Diff Detail

Event Timeline

foad created this revision.May 25 2023, 4:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 4:07 AM
foad requested review of this revision.May 25 2023, 4:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 4:07 AM
nikic accepted this revision.May 25 2023, 7:27 AM

LGTM

This revision is now accepted and ready to land.May 25 2023, 7:27 AM
This revision was automatically updated to reflect the committed changes.