This is an archive of the discontinued LLVM Phabricator instance.

[libc] Use __builtin_ctzll instead of __builtin_ctzl in elements_x86.h.
ClosedPublic

Authored by sivachandra on Jun 24 2021, 11:03 PM.

Details

Summary

builtin_ctzl takes an unsigned long argument which need not be 64-bit
long on all platforms. Using
builtin_ctzll, which takes an unsigned
long long argument, ensures that 64-bit values will be handled on a
wider range of platforms.

Without this change, the test corresponding to M512 fails in Windows.

Diff Detail

Event Timeline

sivachandra created this revision.Jun 24 2021, 11:03 PM
sivachandra requested review of this revision.Jun 24 2021, 11:03 PM
gchatelet accepted this revision.Jun 25 2021, 12:19 AM

LGTM thx!

This revision is now accepted and ready to land.Jun 25 2021, 12:19 AM