diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index a2c5097a7a..154330dd02 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -7418,6 +7418,15 @@ public: { if (auto [ok, bs] = match_expr(b, byteswap(match())); ok) { + if (m_use_avx512_icl && (op.ra != op.rb)) + { + const auto m = gf2p8affineqb(c, build(0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20), 0x7f); + const auto mm = select(noncast(m) >= 0, splat(0), m); + const auto ab = vperm2b(as, bs, c); + set_vr(op.rt4, select(noncast(c) >= 0, ab, mm)); + return; + } + const auto x = avg(noncast(sext((c & 0xc0) == 0xc0)), noncast(sext((c & 0xe0) == 0xc0))); const auto ax = pshufb(as, c); const auto bx = pshufb(bs, c); @@ -7455,6 +7464,16 @@ public: } } + if (m_use_avx512_icl && (op.ra != op.rb || m_interp_magn)) + { + const auto m = gf2p8affineqb(c, build(0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20), 0x7f); + const auto mm = select(noncast(m) >= 0, splat(0), m); + const auto cr = eval(~c); + const auto ab = vperm2b(b, a, cr); + set_vr(op.rt4, select(noncast(cr) >= 0, mm, ab)); + return; + } + const auto x = avg(noncast(sext((c & 0xc0) == 0xc0)), noncast(sext((c & 0xe0) == 0xc0))); const auto cr = eval(c ^ 0xf); const auto ax = pshufb(a, cr);