[compiler-rt] Add infrastructure for testing cpuid builtins (PR #101927)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 00:26:52 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff c7231e49099d56fdc5b2207142184a0bf2544ec1 ebf2980a88fb12689b089a616fc51850b659d395 --extensions cpp,h -- compiler-rt/test/builtins/Unit/cpu_model/cpuid.cpp compiler-rt/test/builtins/Unit/cpu_model/cpuid.h compiler-rt/test/builtins/Unit/cpu_model/x86.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/compiler-rt/test/builtins/Unit/cpu_model/x86.cpp b/compiler-rt/test/builtins/Unit/cpu_model/x86.cpp
index ccf6419271..610fcb4a6b 100644
--- a/compiler-rt/test/builtins/Unit/cpu_model/x86.cpp
+++ b/compiler-rt/test/builtins/Unit/cpu_model/x86.cpp
@@ -10,8 +10,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "gtest/gtest.h"
 #include "cpuid.h"
+#include "gtest/gtest.h"
 
 // TODO(boomanaiden154): This file currently only contains a single test to
 // ensure that the build system components for this test work as expected. The
@@ -19,7 +19,7 @@
 // validated as working on the buildbots.
 
 TEST(BuiltsinCPUModelTest, TestTrue) {
-  OverrideCPUID(1,0,0,4294967295);
+  OverrideCPUID(1, 0, 0, 4294967295);
   int SupportsCmov = __builtin_cpu_supports("cmov");
   ASSERT_TRUE(SupportsCmov);
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/101927


More information about the llvm-commits mailing list