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

Dmitry Vyukov via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 11 23:53:02 PST 2023


================
@@ -0,0 +1,37 @@
+#include "tsan_interface_avx2.h"
+
+#include <immintrin.h>
+#include <inttypes.h>
+#include <stdint.h>
+#include <unistd.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))
+
+using namespace __tsan;
+
+#ifdef __AVX__
+extern "C" void __tsan_scatter_vector4(__m256i vaddr, int size, uint8_t mask) {
+  void *addr[4] = {};
----------------
dvyukov wrote:

We always cast it to something else and never use it as 'void*', so I would do s/void*/uptr/ to remove at least 1 cast.
Here and below.

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


More information about the Openmp-commits mailing list