This is an archive of the discontinued LLVM Phabricator instance.

Revert "Re-fix _lrotl/_lrotr to always take Long, no matter the platform."
Needs ReviewPublic

Authored by Bigcheese on May 18 2020, 4:47 PM.

Details

Summary

This reverts commit 92146ce399cdb26c3a9aa4d68af8cacb7c1c0fef.

This commit broke users targeting LP64 systems that expect these
intrinsics to match the MSVC behavior of working on 32 bit integers.
These users use a LONG macro which is defined as long on Windows
(LLP64), and int when targeting LP64 systems. Without this behavior
there is no intrinsic for 32 bit rotates on these platforms.

Diff Detail

Event Timeline

Bigcheese created this revision.May 18 2020, 4:47 PM
rnk added a comment.May 18 2020, 5:45 PM

I'd be fine going back to the behavior from before.

Without this behavior there is no intrinsic for 32 bit rotates on these platforms.

Strictly speaking, there seems to be __builtin_rotate(left|right)32, which is portable to all clang platforms.

In D80172#2042946, @rnk wrote:

I'd be fine going back to the behavior from before.

Without this behavior there is no intrinsic for 32 bit rotates on these platforms.

Strictly speaking, there seems to be __builtin_rotate(left|right)32, which is portable to all clang platforms.

Sorry, I meant there's no MSVC intrinsic.

bruno resigned from this revision.May 19 2021, 6:14 PM