From 888bac304442e1a6883cfb922d21a74df910112d Mon Sep 17 00:00:00 2001 From: Katelyn Gadd Date: Wed, 10 May 2023 09:28:21 -0700 Subject: [PATCH] Disable autovectorization on wasm (#86038) 7c75cbf added the -msimd128 flag to cmakelists so that the interpreter could use wasm vector intrinsics. That option appears to imply enabling all sorts of auto-vectorization, which may be responsible for the regressions in dotnet/perf-autofiling-issues#17570 --- src/mono/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 5ff644b7cd57d..dde6655d0e7ed 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -270,7 +270,14 @@ elseif(CLR_CMAKE_HOST_OS STREQUAL "emscripten") add_compile_options(-Wno-strict-prototypes) add_compile_options(-Wno-unused-but-set-variable) add_compile_options(-Wno-single-bit-bitfield-constant-conversion) + # Allow using WASM simd intrinsics in the interpreter add_compile_options(-msimd128) + # Disable autovectorization (it is automatically turned on by msimd128) + add_compile_options(-disable-loop-vectorization) + add_compile_options(-disable-vectorization) + add_compile_options(-fno-vectorize) + add_compile_options(-fno-tree-vectorize) + add_compile_options(-fno-slp-vectorize) set(DISABLE_EXECUTABLES 1) # FIXME: Is there a cmake option for this ? set(DISABLE_SHARED_LIBS 1)