diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index b7e4da72c7..070a7ecaab 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -9930,8 +9930,8 @@ public: m_ir->SetInsertPoint(done); const auto ad64 = m_ir->CreateZExt(ad32, get_type()); - const auto pptr = m_ir->CreateGEP(m_function_table->getValueType(), m_function_table, {m_ir->getInt64(0), m_ir->CreateLShr(ad64, 2, "", true)}); - tail_chunk({m_dispatch->getFunctionType(), m_ir->CreateLoad(pptr->getType()->getPointerElementType(), pptr)}); + const auto pptr = dyn_cast(m_ir->CreateGEP(m_function_table->getValueType(), m_function_table, {m_ir->getInt64(0), m_ir->CreateLShr(ad64, 2, "", true)})); + tail_chunk({m_dispatch->getFunctionType(), m_ir->CreateLoad(pptr->getResultElementType(), pptr)}); m_ir->SetInsertPoint(fail); }