diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index 5dd6730316..460c2bf00d 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -6463,6 +6463,23 @@ public: void FSM(spu_opcode_t op) { + // FSM following a comparison instruction + if (match_vr(op.ra, [&](auto c, auto MP) + { + using VT = typename decltype(MP)::type; + + if (auto [ok, x] = match_expr(c, sext(match]>())); ok) + { + set_vr(op.rt, (splat_scalar(c))); + return true; + } + + return false; + })) + { + return; + } + const auto v = extract(get_vr(op.ra), 3); const auto m = bitcast(trunc(v)); set_vr(op.rt, sext(m));