From a34756bbedacdf2558c966466a71bfd3715fa295 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Wed, 13 Aug 2025 02:34:31 +0800 Subject: [PATCH] Revert "nir: Temporarily disable optimizations for MSVC ARM64" This reverts commit 55d153b9f598c77510a483ba768eca2103bf850b. The msvc bug is https://developercommunity.visualstudio.com/t/Stack-overflow-compiling-C-code-to-ARM64/916235 and Fixed In: Visual Studio 2022 version 17.7 Signed-off-by: Yonggang Luo Reviewed-by: Jesse Natalie Part-of: --- src/compiler/nir/nir_constant_expressions.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/compiler/nir/nir_constant_expressions.py b/src/compiler/nir/nir_constant_expressions.py index 01b1fb2c888..ac52414b900 100644 --- a/src/compiler/nir/nir_constant_expressions.py +++ b/src/compiler/nir/nir_constant_expressions.py @@ -566,11 +566,6 @@ struct ${type}${width}_vec { % for name, op in sorted(opcodes.items()): -% if op.name == "fsat": -#if defined(_MSC_VER) && (defined(_M_ARM64) || defined(_M_ARM64EC)) -#pragma optimize("", off) /* Temporary work-around for MSVC compiler bug, present in VS2019 16.9.2 */ -#endif -% endif static void evaluate_${name}(nir_const_value *_dst_val, UNUSED unsigned num_components, @@ -594,11 +589,6 @@ evaluate_${name}(nir_const_value *_dst_val, ${evaluate_op(op, 0, execution_mode)} % endif } -% if op.name == "fsat": -#if defined(_MSC_VER) && (defined(_M_ARM64) || defined(_M_ARM64EC)) -#pragma optimize("", on) /* Temporary work-around for MSVC compiler bug, present in VS2019 16.9.2 */ -#endif -% endif % endfor void