This is an archive of the discontinued LLVM Phabricator instance.

[Support] make countLeadingZeros() countTrailingZeros() countLeadingOnes() and countTrailingOnes() return unsigned
ClosedPublic

Authored by shawnl on Apr 17 2019, 6:51 AM.

Details

Summary

This matches APInt's versions of these functions, and there is no need for these to be size_t.

(as well as __builtin_clzll())

Diff Detail

Repository
rL LLVM

Event Timeline

shawnl created this revision.Apr 17 2019, 6:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2019, 6:51 AM
shawnl planned changes to this revision.Apr 17 2019, 6:56 AM
shawnl updated this revision to Diff 195561.
shawnl retitled this revision from [Support] make countLeadingZeros() and countTrailingZeros() return unsigned to [Support] make countLeadingZeros() countTrailingZeros() countLeadingOnes() and countTrailingOnes() return unsigned.
shawnl edited the summary of this revision. (Show Details)

bugs

shawnl updated this revision to Diff 195564.Apr 17 2019, 7:02 AM
rnk accepted this revision.Apr 19 2019, 9:57 AM

Seems fine.

This revision is now accepted and ready to land.Apr 19 2019, 9:57 AM
shawnl closed this revision.May 26 2019, 7:44 AM

applied r361724