From 2b4da187097715b1c6c6a3bab9541ae4430904b7 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Thu, 2 May 2019 13:36:56 +0300 Subject: [PATCH] SPU LLVM: fix xfloat regression It was an old bug with possible hidden use of deleted instructions. --- rpcs3/Emu/Cell/SPURecompiler.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index c927f8b9de..bddb154ba1 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -2698,9 +2698,17 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator newphi->addIncoming(xfloat_to_double(ivalue), iblock); } - if (phi->getParent() == m_block->block) + for (auto& b : m_blocks) { - m_block->phi[index] = newphi; + if (b.second.phi[index] == phi) + { + b.second.phi[index] = newphi; + } + + if (b.second.reg[index] == phi) + { + b.second.reg[index] = newphi; + } } reg = newphi;