[llvm-commits] [llvm] r172734 - /llvm/trunk/include/llvm/Support/MathExtras.h

Aaron Ballman aaron at aaronballman.com
Thu Jan 17 12:04:57 PST 2013


Rolled back in r172751; thanks for pointing this out!

~Aaron

On Thu, Jan 17, 2013 at 2:41 PM, Benjamin Kramer <benny.kra at gmail.com> wrote:
>
> On 17.01.2013, at 19:27, Aaron Ballman <aaron at aaronballman.com> wrote:
>
>> Author: aaronballman
>> Date: Thu Jan 17 12:27:30 2013
>> New Revision: 172734
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=172734&view=rev
>> Log:
>> Reverting back to the fallback instead of using popcnt; this instruction doesn't exist on all CPU architectures.  Fixes PR14982
>
> popcntq isn't available on all _M_X64 machines either.
>
> - Ben
>>
>> Modified:
>>    llvm/trunk/include/llvm/Support/MathExtras.h
>>
>> Modified: llvm/trunk/include/llvm/Support/MathExtras.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MathExtras.h?rev=172734&r1=172733&r2=172734&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Support/MathExtras.h (original)
>> +++ llvm/trunk/include/llvm/Support/MathExtras.h Thu Jan 17 12:27:30 2013
>> @@ -303,8 +303,6 @@
>> inline unsigned CountPopulation_32(uint32_t Value) {
>> #if __GNUC__ >= 4
>>   return __builtin_popcount(Value);
>> -#elif defined(_MSC_VER)
>> -  return __popcnt(Value);
>> #else
>>   uint32_t v = Value - ((Value >> 1) & 0x55555555);
>>   v = (v & 0x33333333) + ((v >> 2) & 0x33333333);
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list