[ARM] Masked load and store and predicate tests. NFC
[llvm-complete.git] / unittests / Support / Threading.cpp
blob01f1c5134482fb5675f4fb8f920319447fd0ff2d
1 //===- unittests/Threading.cpp - Thread tests -----------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "llvm/Support/Threading.h"
10 #include "llvm/Support/thread.h"
11 #include "gtest/gtest.h"
13 using namespace llvm;
15 namespace {
17 TEST(Threading, PhysicalConcurrency) {
18 auto Num = heavyweight_hardware_concurrency();
19 // Since Num is unsigned this will also catch us trying to
20 // return -1.
21 ASSERT_LE(Num, thread::hardware_concurrency());
24 } // end anon namespace