From c1580ebf30164557af29200fbe4941026681883a Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sun, 4 Jun 2023 10:57:22 -0700 Subject: [PATCH] msvc: workaround optimizer bug --- .../Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp index 26848d8d9c..46b246c910 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp @@ -326,7 +326,17 @@ void JitArm64::boolX(UGeckoInstruction inst) else if ((gpr.IsImm(s) && (gpr.GetImm(s) == 0 || gpr.GetImm(s) == 0xFFFFFFFF)) || (gpr.IsImm(b) && (gpr.GetImm(b) == 0 || gpr.GetImm(b) == 0xFFFFFFFF))) { - const auto [i, j] = gpr.IsImm(s) ? std::pair(s, b) : std::pair(b, s); + int i, j; + if (gpr.IsImm(s)) + { + i = s; + j = b; + } + else + { + i = b; + j = s; + } bool is_zero = gpr.GetImm(i) == 0; bool complement_b = (inst.SUBOP10 == 60 /* andcx */) || (inst.SUBOP10 == 412 /* orcx */);