From 34f79904fd71e2c45028dcf70cc64bd4d75744c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 10 Jan 2018 09:18:12 +0100 Subject: [PATCH] IR: This optimization is safe when all three regs are consecutive, so avoid disabling it unnecessarily. --- Core/MIPS/IR/IRCompVFPU.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Core/MIPS/IR/IRCompVFPU.cpp b/Core/MIPS/IR/IRCompVFPU.cpp index 82ecffc1da..63fe98b033 100644 --- a/Core/MIPS/IR/IRCompVFPU.cpp +++ b/Core/MIPS/IR/IRCompVFPU.cpp @@ -617,17 +617,16 @@ namespace MIPSComp { GetVectorRegsPrefixD(dregs, sz, _VD); u8 tempregs[4]; - bool usingTemps = false; for (int i = 0; i < n; i++) { if (!IsOverlapSafe(dregs[i], n, sregs, n, tregs)) { tempregs[i] = IRVTEMP_0 + i; - usingTemps = true; } else { tempregs[i] = dregs[i]; } } - if (allowSIMD && sz == V_Quad && !usingTemps && IsConsecutive4(dregs) && IsConsecutive4(sregs) && IsConsecutive4(tregs)) { + // If all three are consecutive 4, we're safe regardless of if we use temps so we should not check that here. + if (allowSIMD && sz == V_Quad && IsConsecutive4(dregs) && IsConsecutive4(sregs) && IsConsecutive4(tregs)) { IROp opFunc = IROp::Nop; switch (op >> 26) { case 24: //VFPU0