Enable autodetect of popcnt
authorMon P Wang <wangmp@apple.com>
Tue, 17 May 2011 18:33:37 +0000 (18:33 +0000)
committerMon P Wang <wangmp@apple.com>
Tue, 17 May 2011 18:33:37 +0000 (18:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131476 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86Subtarget.cpp

index ba5864ef0e0a20f12ceab150dfa3d5e35736bba1..481e821030b3bfb26bebac044de27fd13449918c 100644 (file)
@@ -265,6 +265,7 @@ void X86Subtarget::AutoDetectSubtargetFeatures() {
 
   HasCLMUL = IsIntel && ((ECX >> 1) & 0x1);
   HasFMA3  = IsIntel && ((ECX >> 12) & 0x1);
+  HasPOPCNT = IsIntel && ((ECX >> 23) & 0x1);
   HasAES   = IsIntel && ((ECX >> 25) & 0x1);
 
   if (IsIntel || IsAMD) {