File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,14 @@ elseif(MSVC_VERSION LESS 1900)
6666 message (FATAL_ERROR "Vc 1.x requires at least Visual Studio 2015." )
6767endif ()
6868
69+ if (MSVC AND (NOT DEFINED Vc_USE_MSVC_SSA_OPTIMIZER_DESPITE_BUGGY_EXP OR NOT Vc_USE_MSVC_SSA_OPTIMIZER_DESPITE_BUGGY_EXP) AND
70+ CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.20)
71+ # bug report: https://developercommunity.visualstudio.com/t/AVX-codegen-bug-on-Vc-with-MSVC-2019/1470844#T-N1521672
72+ message (STATUS "WARNING! MSVC starting with 19.20 uses a new optimizer that has a bug causing Vc::exp() to return slighly wrong results.\
73+ You can set Vc_USE_MSVC_SSA_OPTIMIZER_DESPITE_BUGGY_EXP=ON to still use the new optimizer on the affected MSVC versions." )
74+ AddCompilerFlag ("/d2SSAOptimizer-" CXX_RESULT _ok CXX_FLAGS CMAKE_CXX_FLAGS )
75+ endif ()
76+
6977if (Vc_COMPILER_IS_GCC)
7078 if (Vc_GCC_VERSION VERSION_GREATER "5.0.0" AND Vc_GCC_VERSION VERSION_LESS "6.0.0" )
7179 UserWarning ("GCC 5 goes into an endless loop comiling example_scaling_scalar. Therefore, this target is disabled." )
You can’t perform that action at this time.
0 commit comments