This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Change numBitsSigned for simplicity and document it. NFC.
ClosedPublic

Authored by foad on Oct 29 2021, 6:02 AM.

Details

Summary

Change numBitsSigned to return the minimum size of a signed integer that
can hold the value. This is different by one from the previous result
but is more consistent with numBitsUnsigned. Update all callers. All
callers are now more consistent between the signed and unsigned cases,
and some callers get simpler, especially the ones that deal with
quantities like numBitsSigned(LHS) + numBitsSigned(RHS).

Diff Detail

Event Timeline

foad created this revision.Oct 29 2021, 6:02 AM
foad requested review of this revision.Oct 29 2021, 6:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 29 2021, 6:02 AM
arsenm accepted this revision.Oct 29 2021, 6:11 AM
This revision is now accepted and ready to land.Oct 29 2021, 6:11 AM
This revision was landed with ongoing or failed builds.Oct 29 2021, 6:22 AM
This revision was automatically updated to reflect the committed changes.