[Openmp-commits] [llvm] [compiler-rt] [openmp] [TSan] Add instrumentation of AVX2 and AVX512 instructions (PR #74636)

via Openmp-commits openmp-commits at lists.llvm.org
Wed Dec 6 10:14:06 PST 2023


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 9bad6cb7fc571821bfacc8926a8a7f5d147ce540 e54345701a10dc8b161eb9353e2fd7dc86bbc44f -- compiler-rt/lib/tsan/rtl/tsan_interface_avx2.cpp compiler-rt/lib/tsan/rtl/tsan_interface_avx2.h compiler-rt/lib/tsan/rtl/tsan_interface_avx512.cpp compiler-rt/lib/tsan/rtl/tsan_interface_avx512.h compiler-rt/test/tsan/simd_broadcast_norace.c compiler-rt/test/tsan/simd_broadcast_race.c compiler-rt/test/tsan/simd_gather_race.c compiler-rt/test/tsan/simd_gatherscatter_norace.c compiler-rt/test/tsan/simd_loadstore_norace.c compiler-rt/test/tsan/simd_loadstore_race.c compiler-rt/test/tsan/simd_scatter_mask_norace.c compiler-rt/test/tsan/simd_scatter_mask_race.c compiler-rt/test/tsan/simd_scatter_race.c openmp/tools/archer/tests/simd/simd-broadcast-no.c openmp/tools/archer/tests/simd/simd-broadcast-yes.c openmp/tools/archer/tests/simd/simd-gather-yes.c openmp/tools/archer/tests/simd/simd-gatherscatter-no.c openmp/tools/archer/tests/simd/simd-loadstore-no.c openmp/tools/archer/tests/simd/simd-loadstore-yes.c openmp/tools/archer/tests/simd/simd-scatter-yes.c compiler-rt/lib/tsan/rtl/tsan_interface.cpp compiler-rt/lib/tsan/rtl/tsan_interface.h compiler-rt/lib/tsan/rtl/tsan_interface.inc llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interface.cpp b/compiler-rt/lib/tsan/rtl/tsan_interface.cpp
index c97cf62e2e..7dff3ecc41 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interface.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_interface.cpp
@@ -11,11 +11,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "tsan_interface.h"
-#include "tsan_interface_ann.h"
-#include "tsan_rtl.h"
 
 #include "sanitizer_common/sanitizer_internal_defs.h"
 #include "sanitizer_common/sanitizer_ptrauth.h"
+#include "tsan_interface_ann.h"
+#include "tsan_rtl.h"
 
 #define CALLERPC ((uptr)__builtin_return_address(0))
 
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interface_avx2.h b/compiler-rt/lib/tsan/rtl/tsan_interface_avx2.h
index 84c001be88..14baa94cc3 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interface_avx2.h
+++ b/compiler-rt/lib/tsan/rtl/tsan_interface_avx2.h
@@ -1,4 +1,5 @@
-//===-- tsan_interface_avx2.h ----------------------------------------*- C++ -*-===//
+//===-- tsan_interface_avx2.h ----------------------------------------*- C++
+//-*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interface_avx512.h b/compiler-rt/lib/tsan/rtl/tsan_interface_avx512.h
index 179f64a89a..3bfc00bb0f 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interface_avx512.h
+++ b/compiler-rt/lib/tsan/rtl/tsan_interface_avx512.h
@@ -1,4 +1,5 @@
-//===-- tsan_interface_avx512.h ----------------------------------------*- C++ -*-===//
+//===-- tsan_interface_avx512.h ----------------------------------------*- C++
+//-*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
diff --git a/openmp/tools/archer/tests/simd/simd-broadcast-yes.c b/openmp/tools/archer/tests/simd/simd-broadcast-yes.c
index 23a0f54509..f9bc8338d7 100644
--- a/openmp/tools/archer/tests/simd/simd-broadcast-yes.c
+++ b/openmp/tools/archer/tests/simd/simd-broadcast-yes.c
@@ -10,9 +10,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-// RUN: %libarcher-compile -DTYPE=float && %libarcher-run-race | FileCheck --check-prefix=FLOAT %s 
-// RUN: %libarcher-compile -DTYPE=double && %libarcher-run-race | FileCheck --check-prefix=DOUBLE %s 
-// REQUIRES: tsan
+// RUN: %libarcher-compile -DTYPE=float && %libarcher-run-race | FileCheck
+// --check-prefix=FLOAT %s RUN: %libarcher-compile -DTYPE=double &&
+// %libarcher-run-race | FileCheck --check-prefix=DOUBLE %s REQUIRES: tsan
 
 #include <math.h>
 #include <stdio.h>
diff --git a/openmp/tools/archer/tests/simd/simd-gather-yes.c b/openmp/tools/archer/tests/simd/simd-gather-yes.c
index 881ab6f17d..3eada6b7b8 100644
--- a/openmp/tools/archer/tests/simd/simd-gather-yes.c
+++ b/openmp/tools/archer/tests/simd/simd-gather-yes.c
@@ -10,10 +10,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-// RUN: %libarcher-compile -DTYPE=float -DSIMDLEN=4 && %libarcher-run-race | FileCheck --check-prefix=FLOAT %s
-// RUN: %libarcher-compile -DTYPE=float -DSIMDLEN=8 && %libarcher-run-race | FileCheck --check-prefix=FLOAT %s
-// RUN: %libarcher-compile -DTYPE=double -DSIMDLEN=4 && %libarcher-run-race | FileCheck --check-prefix=DOUBLE %s
-// RUN: %libarcher-compile -DTYPE=double -DSIMDLEN=8 && %libarcher-run-race | FileCheck --check-prefix=DOUBLE %s
+// RUN: %libarcher-compile -DTYPE=float -DSIMDLEN=4 && %libarcher-run-race |
+// FileCheck --check-prefix=FLOAT %s RUN: %libarcher-compile -DTYPE=float
+// -DSIMDLEN=8 && %libarcher-run-race | FileCheck --check-prefix=FLOAT %s RUN:
+// %libarcher-compile -DTYPE=double -DSIMDLEN=4 && %libarcher-run-race |
+// FileCheck --check-prefix=DOUBLE %s RUN: %libarcher-compile -DTYPE=double
+// -DSIMDLEN=8 && %libarcher-run-race | FileCheck --check-prefix=DOUBLE %s
 // REQUIRES: tsan
 
 #include <stdio.h>
diff --git a/openmp/tools/archer/tests/simd/simd-loadstore-yes.c b/openmp/tools/archer/tests/simd/simd-loadstore-yes.c
index d122a0bda2..1e736142c3 100644
--- a/openmp/tools/archer/tests/simd/simd-loadstore-yes.c
+++ b/openmp/tools/archer/tests/simd/simd-loadstore-yes.c
@@ -10,9 +10,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-// RUN: %libarcher-compile -DTYPE=float && %libarcher-run-race | FileCheck --check-prefix=FLOAT %s
-// RUN: %libarcher-compile -DTYPE=double && %libarcher-run-race | FileCheck --check-prefix=DOUBLE %s
-// REQUIRES: tsan
+// RUN: %libarcher-compile -DTYPE=float && %libarcher-run-race | FileCheck
+// --check-prefix=FLOAT %s RUN: %libarcher-compile -DTYPE=double &&
+// %libarcher-run-race | FileCheck --check-prefix=DOUBLE %s REQUIRES: tsan
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/openmp/tools/archer/tests/simd/simd-scatter-yes.c b/openmp/tools/archer/tests/simd/simd-scatter-yes.c
index fcf3178381..68763ab6b7 100644
--- a/openmp/tools/archer/tests/simd/simd-scatter-yes.c
+++ b/openmp/tools/archer/tests/simd/simd-scatter-yes.c
@@ -10,10 +10,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-// RUN: %libarcher-compile -DTYPE=float -DSIMDLEN=4 && %libarcher-run-race | FileCheck --check-prefix=FLOAT %s
-// RUN: %libarcher-compile -DTYPE=float -DSIMDLEN=8 && %libarcher-run-race | FileCheck --check-prefix=FLOAT %s
-// RUN: %libarcher-compile -DTYPE=double -DSIMDLEN=4 && %libarcher-run-race | FileCheck --check-prefix=DOUBLE %s
-// RUN: %libarcher-compile -DTYPE=double -DSIMDLEN=8 && %libarcher-run-race | FileCheck --check-prefix=DOUBLE %s
+// RUN: %libarcher-compile -DTYPE=float -DSIMDLEN=4 && %libarcher-run-race |
+// FileCheck --check-prefix=FLOAT %s RUN: %libarcher-compile -DTYPE=float
+// -DSIMDLEN=8 && %libarcher-run-race | FileCheck --check-prefix=FLOAT %s RUN:
+// %libarcher-compile -DTYPE=double -DSIMDLEN=4 && %libarcher-run-race |
+// FileCheck --check-prefix=DOUBLE %s RUN: %libarcher-compile -DTYPE=double
+// -DSIMDLEN=8 && %libarcher-run-race | FileCheck --check-prefix=DOUBLE %s
 // REQUIRES: tsan
 
 #include <stdio.h>

``````````

</details>


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


More information about the Openmp-commits mailing list