This is an archive of the discontinued LLVM Phabricator instance.

[ARM][AArch64] Make ACLE __clzl/__clzll return unsigned int instead of unsigned long/uint64_t.
ClosedPublic

Authored by craig.topper on Jul 10 2023, 5:20 PM.

Details

Summary

Use unsigned long in place of uint32_t for both clz and cls.

As far as I can tell this matches what ACLE defines and what gcc implements.

Noticed while investigating fixing https://github.com/llvm/llvm-project/issues/63113

Diff Detail

Event Timeline

craig.topper created this revision.Jul 10 2023, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2023, 5:20 PM
craig.topper requested review of this revision.Jul 10 2023, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2023, 5:20 PM

Update __clzl test case to pass an unsigned long instead of signed long.

tmatheson accepted this revision.Jul 11 2023, 2:00 AM

LGTM, thanks. Seems odd that the ACLE mixes uint32_t and unsigned int.

This revision is now accepted and ready to land.Jul 11 2023, 2:00 AM
This revision was landed with ongoing or failed builds.Jul 11 2023, 10:42 AM
This revision was automatically updated to reflect the committed changes.