[msan] Fix BMI2 detection in msan tests.

llvm-svn: 355885
This commit is contained in:
Evgeniy Stepanov 2019-03-12 00:19:09 +00:00
parent 0561be6ce4
commit 17ee3b4b74
1 changed files with 1 additions and 1 deletions

View File

@ -4650,7 +4650,7 @@ static bool HaveBmi() {
U4 a = 0, b = 0, c = 0, d = 0;
asm("cpuid\n\t" : "=a"(a), "=D"(b), "=c"(c), "=d"(d) : "a"(7));
const U4 kBmi12Mask = (1U<<3) | (1U<<8);
return b | kBmi12Mask;
return b & kBmi12Mask;
}
__attribute__((target("bmi,bmi2")))