Merge pull request #11890 from shuffle2/msvc-opt

msvc: workaround optimizer bug
This commit is contained in:
Admiral H. Curtiss 2023-06-05 13:17:54 +02:00 committed by GitHub
commit e3aaf230e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -326,7 +326,17 @@ void JitArm64::boolX(UGeckoInstruction inst)
else if ((gpr.IsImm(s) && (gpr.GetImm(s) == 0 || gpr.GetImm(s) == 0xFFFFFFFF)) || else if ((gpr.IsImm(s) && (gpr.GetImm(s) == 0 || gpr.GetImm(s) == 0xFFFFFFFF)) ||
(gpr.IsImm(b) && (gpr.GetImm(b) == 0 || gpr.GetImm(b) == 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 is_zero = gpr.GetImm(i) == 0;
bool complement_b = (inst.SUBOP10 == 60 /* andcx */) || (inst.SUBOP10 == 412 /* orcx */); bool complement_b = (inst.SUBOP10 == 60 /* andcx */) || (inst.SUBOP10 == 412 /* orcx */);