Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPU LLVM: AVX-512 optimization for CFLTU #14384

Merged
merged 1 commit into from Jul 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions rpcs3/Emu/Cell/SPURecompiler.cpp
Expand Up @@ -9871,6 +9871,15 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator
a = eval(a * s);

value_t<s32[4]> r;

if (m_use_avx512)
{
const auto sc = clamp_smax(a);
r.value = m_ir->CreateFPToUI(sc.value, get_type<s32[4]>());
set_vr(op.rt, r);
return;
}

r.value = m_ir->CreateFPToUI(a.value, get_type<s32[4]>());
set_vr(op.rt, select(bitcast<s32[4]>(a) > splat<s32[4]>(((32 + 127) << 23) - 1), splat<s32[4]>(-1), r & ~(bitcast<s32[4]>(a) >> 31)));
}
Expand Down