[llvm] r367929 - BMI2 support is indicated in bit eight of EBX, not nine.
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 14:25:59 PDT 2019
Author: echristo
Date: Mon Aug 5 14:25:59 2019
New Revision: 367929
URL: http://llvm.org/viewvc/llvm-project?rev=367929&view=rev
Log:
BMI2 support is indicated in bit eight of EBX, not nine.
See Intel SDM, Vol 2A, Table 3-8:
https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf#page=296
Differential Revision: https://reviews.llvm.org/D65766
Modified:
llvm/trunk/lib/Support/Host.cpp
Modified: llvm/trunk/lib/Support/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=367929&r1=367928&r2=367929&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Host.cpp (original)
+++ llvm/trunk/lib/Support/Host.cpp Mon Aug 5 14:25:59 2019
@@ -1034,7 +1034,7 @@ static void getAvailableFeatures(unsigne
setFeature(X86::FEATURE_BMI);
if (HasLeaf7 && ((EBX >> 5) & 1) && HasAVX)
setFeature(X86::FEATURE_AVX2);
- if (HasLeaf7 && ((EBX >> 9) & 1))
+ if (HasLeaf7 && ((EBX >> 8) & 1))
setFeature(X86::FEATURE_BMI2);
if (HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save)
setFeature(X86::FEATURE_AVX512F);
More information about the llvm-commits
mailing list