summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-loop-analysis.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-10-20 01:30:00 +0000
committerCraig Topper <craig.topper@intel.com>2018-10-20 01:30:00 +0000
commit9c8f3c9654885eb321573fbb4f5da58ae38cd087 (patch)
treeaac33681563e634429fe874dda0b3d50d72cd36d /clang/test/SemaCXX/warn-loop-analysis.cpp
parent25dac79edf0c7b8c8481ce358c074352c7289006 (diff)
downloadbcm5719-llvm-9c8f3c9654885eb321573fbb4f5da58ae38cd087.tar.gz
bcm5719-llvm-9c8f3c9654885eb321573fbb4f5da58ae38cd087.zip
[X86] When checking the bits in cpu_features for function multiversioning dispatcher in the resolver, make sure all the required bits are set. Not just one of them
Summary: The multiversioning code repurposed the code from __builtin_cpu_supports for checking if a single feature is enabled. That code essentially performed (_cpu_features & (1 << C)) != 0. But with the multiversioning path, the mask is no longer guaranteed to be a power of 2. So we return true anytime any one of the bits in the mask is set not just all of the bits. The correct check is (_cpu_features & mask) == mask Reviewers: erichkeane, echristo Reviewed By: echristo Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53460 llvm-svn: 344824
Diffstat (limited to 'clang/test/SemaCXX/warn-loop-analysis.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud