[PATCH] D33616: [MS] Fix _bittest* intrinsics for values bigger than 31
David Majnemer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 30 19:57:06 PDT 2017
majnemer added inline comments.
================
Comment at: clang/lib/Headers/intrin.h:345-347
+ _BitBase += (_BitPos / 32);
+ _BitPos %= 32;
return (*_BitBase >> _BitPos) & 1;
----------------
`_bittest` seems to expand to `(((unsigned char const *)_BitBase)[_BitPos >> 3] >> (_BitPos & 7)) & 1` on CL ARM: https://godbolt.org/g/Yc8rMH
Perhaps these are the intended semantics?
https://reviews.llvm.org/D33616
More information about the cfe-commits
mailing list