From 72fbdf1a6bafe8a01c58deae79fbae44535a34f4 Mon Sep 17 00:00:00 2001 From: Sintendo Date: Sun, 19 Apr 2020 22:38:58 +0200 Subject: [PATCH] Jit64: addx - Deduplicate branches part 1 No functional change, just simplify some repeated logic for the cases where the destination register matches one of the sources. --- Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index 494969b71f..445f536d11 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -1330,13 +1330,10 @@ void Jit64::addx(UGeckoInstruction inst) RCX64Reg Rd = gpr.Bind(d, RCMode::Write); RegCache::Realize(Ra, Rb, Rd); - if (d == a) + if ((d == a) || (d == b)) { - ADD(32, Rd, Rb); - } - else if (d == b) - { - ADD(32, Rd, Ra); + RCOpArg& Rnotd = (d == a) ? Rb : Ra; + ADD(32, Rd, Rnotd); } else if (Ra.IsSimpleReg() && Rb.IsSimpleReg() && !inst.OE) {