projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ac6d7e
)
[msan] Fix BMI2 detection in msan tests, take 2.
author
Jonas Hahnfeld
<hahnjo@hahnjo.de>
Fri, 15 Mar 2019 10:15:13 +0000
(10:15 +0000)
committer
Jonas Hahnfeld
<hahnjo@hahnjo.de>
Fri, 15 Mar 2019 10:15:13 +0000
(10:15 +0000)
It's not enough if only one bit is present, we need to check that
both are set. This finally fixes the test failures for me.
llvm-svn: 356242
compiler-rt/lib/msan/tests/msan_test.cc
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/msan/tests/msan_test.cc
b/compiler-rt/lib/msan/tests/msan_test.cc
index
8b38fc3
..
d2002d1
100644
(file)
--- a/
compiler-rt/lib/msan/tests/msan_test.cc
+++ b/
compiler-rt/lib/msan/tests/msan_test.cc
@@
-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) ==
kBmi12Mask;
}
__attribute__((target("bmi,bmi2")))