[compiler-rt] d841086 - tsan: enable -msse4 when compiling tests

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 25 08:07:09 PST 2021


Author: Dmitry Vyukov
Date: 2021-11-25T17:07:02+01:00
New Revision: d841086ae62118408e4211685c3e2f5fff0021b5

URL: https://github.com/llvm/llvm-project/commit/d841086ae62118408e4211685c3e2f5fff0021b5
DIFF: https://github.com/llvm/llvm-project/commit/d841086ae62118408e4211685c3e2f5fff0021b5.diff

LOG: tsan: enable -msse4 when compiling tests

Vector SSE accesses make compiler emit __tsan_[unaligned_]read/write16 callbacks.
Make it possible to test these.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D114591

Added: 
    

Modified: 
    compiler-rt/test/tsan/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/tsan/CMakeLists.txt b/compiler-rt/test/tsan/CMakeLists.txt
index 1b267ae472ea4..25e95aa98cf95 100644
--- a/compiler-rt/test/tsan/CMakeLists.txt
+++ b/compiler-rt/test/tsan/CMakeLists.txt
@@ -41,6 +41,10 @@ foreach(arch ${TSAN_TEST_ARCH})
   string(REPLACE ";" " " LIBDISPATCH_CFLAGS_STRING " ${COMPILER_RT_TEST_LIBDISPATCH_CFLAGS}")
   string(APPEND TSAN_TEST_TARGET_CFLAGS ${LIBDISPATCH_CFLAGS_STRING})
 
+  if (COMPILER_RT_HAS_MSSE4_2_FLAG)
+    string(APPEND TSAN_TEST_TARGET_CFLAGS " -msse4.2 ")
+  endif()
+
   string(TOUPPER ${arch} ARCH_UPPER_CASE)
   set(CONFIG_NAME ${ARCH_UPPER_CASE}Config)
 


        


More information about the llvm-commits mailing list