[compiler-rt] 75e7b6e - [Sanitizer][Apple] Enable sanitizer common unittests for arm64 archs on Apple

Blue Gaston via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 13:51:32 PST 2023


Author: Blue Gaston
Date: 2023-01-10T13:47:32-08:00
New Revision: 75e7b6ee3d25f6b5c4d64cb3e98b73752e00b683

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

LOG: [Sanitizer][Apple] Enable sanitizer common unittests for arm64 archs on Apple

This patch enables sanitizer common unit tests for arm64 architecture only on apple devices.

It also lowers the expected compression ratio for 64 bit machines. Unsure of justification of 130. On apple arm64 we're seeing this number comeout to 128.6

rdar://101436019

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

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
    compiler-rt/lib/sanitizer_common/tests/sanitizer_stack_store_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
index 41b89aa43134f..0c729ecee7152 100644
--- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
@@ -5,6 +5,7 @@ clang_compiler_add_cxx_check()
 # FIXME: use SANITIZER_COMMON_SUPPORTED_ARCH here
 filter_available_targets(SANITIZER_UNITTEST_SUPPORTED_ARCH x86_64 i386 mips64 mips64el riscv64 sparcv9 sparc)
 if(APPLE)
+  list(APPEND SANITIZER_UNITTEST_SUPPORTED_ARCH arm64)
   darwin_filter_host_archs(SANITIZER_UNITTEST_SUPPORTED_ARCH SANITIZER_UNITTEST_SUPPORTED_ARCH)
 endif()
 

diff  --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_stack_store_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_stack_store_test.cpp
index ab491359bfe51..57be1c9b7f186 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_stack_store_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_stack_store_test.cpp
@@ -138,7 +138,7 @@ INSTANTIATE_TEST_SUITE_P(
         StackStorePackTest::ParamType(StackStore::Compression::Delta,
                                       FIRST_32_SECOND_64(2, 6)),
         StackStorePackTest::ParamType(StackStore::Compression::LZW,
-                                      FIRST_32_SECOND_64(60, 130)),
+                                      FIRST_32_SECOND_64(60, 125)),
     }));
 
 TEST_P(StackStorePackTest, PackUnpack) {


        


More information about the llvm-commits mailing list