hanchenye-llvm-project/openmp
Jonas Hahnfeld c9a8a6c030 kmp_affinity: Fix check if specific bit is set
Clang 4.0 trunk warns:
warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]

This points to a potential bug if the code really wants to check if the single
bit is not set: If for example (buf.edx >> 9) = 2 (has any bit set except the
least significant one), 'logical not' will return 0 which stays 0 after the
'bitwise and'.
To do this correctly we first need to evaluate the 'bitwise and'. In that case
it returns 2 & 1 = 0 which after the 'logical not' evaluates to 1.

Differential Revision: https://reviews.llvm.org/D28599

llvm-svn: 291764
2017-01-12 11:39:04 +00:00
..
offload
runtime kmp_affinity: Fix check if specific bit is set 2017-01-12 11:39:04 +00:00
testsuite
www Support of mips & mips64 for openmprtl 2016-12-08 09:22:24 +00:00
CMakeLists.txt Reverting last change. 2016-12-21 09:04:08 +00:00
CREDITS.txt
LICENSE.txt