[PATCH] D25264: Implement MS _BitScan intrinsics

Albert Gutowski via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 5 09:02:08 PDT 2016


agutowski added inline comments.


> majnemer wrote in CGBuiltin.cpp:2656-2684
> Does this do the right thing if the arg is zero?  I think it would if you gave the call to the intrinsic an operand of false instead of true.

MSDN doesn't specify what should be put under the "Index" address when the argument is zero; as I checked, VS2015 with optimizations puts undefined value there, and I hope that's what I'm doing here.

https://reviews.llvm.org/D25264





More information about the cfe-commits mailing list