[compiler-rt] r355885 - [msan] Fix BMI2 detection in msan tests.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 17:19:10 PDT 2019
Author: eugenis
Date: Mon Mar 11 17:19:09 2019
New Revision: 355885
URL: http://llvm.org/viewvc/llvm-project?rev=355885&view=rev
Log:
[msan] Fix BMI2 detection in msan tests.
Modified:
compiler-rt/trunk/lib/msan/tests/msan_test.cc
Modified: compiler-rt/trunk/lib/msan/tests/msan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=355885&r1=355884&r2=355885&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Mon Mar 11 17:19:09 2019
@@ -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")))
More information about the llvm-commits
mailing list