From eaebd3426e7050c35beb8f24952d6da4d6a75360 Mon Sep 17 00:00:00 2001 From: Malcolm Date: Thu, 15 Jan 2026 04:43:02 +0000 Subject: [PATCH] LLVM: enable FMA for ARM cpus unconditionally - All armv8 machines should have FMA. - Should be a speedup for snapdragon elite and apple machines. --- rpcs3/Emu/CPU/CPUTranslator.cpp | 8 -------- rpcs3/Emu/CPU/CPUTranslator.h | 11 ++++++++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/rpcs3/Emu/CPU/CPUTranslator.cpp b/rpcs3/Emu/CPU/CPUTranslator.cpp index 7cb9186d4d..f799e4b6be 100644 --- a/rpcs3/Emu/CPU/CPUTranslator.cpp +++ b/rpcs3/Emu/CPU/CPUTranslator.cpp @@ -201,14 +201,6 @@ void cpu_translator::initialize(llvm::LLVMContext& context, llvm::ExecutionEngin m_use_vnni = true; m_use_gfni = true; } - - // Aarch64 CPUs - if (cpu == "cyclone" || cpu.contains("cortex")) - { - m_use_fma = true; - // AVX does not use intrinsics so far - m_use_avx = true; - } } llvm::Value* cpu_translator::bitcast(llvm::Value* val, llvm::Type* type) const diff --git a/rpcs3/Emu/CPU/CPUTranslator.h b/rpcs3/Emu/CPU/CPUTranslator.h index c709349080..99ddafde0a 100644 --- a/rpcs3/Emu/CPU/CPUTranslator.h +++ b/rpcs3/Emu/CPU/CPUTranslator.h @@ -3081,13 +3081,22 @@ protected: // Allow PSHUFB intrinsic bool m_use_ssse3 = true; +#ifdef ARCH_ARM64 + // all arm CPUS have FMA + bool m_use_fma = true; + // Should be nonsense to set this for ARM, + // but this flag is only used in SPU verification + // For now, setting this flag will speed up SPU verification + // but I will remove this later with explicit parralelism - Whatcookie + bool m_use_avx = true; +#else // Allow FMA bool m_use_fma = false; // Allow AVX bool m_use_avx = false; - +#endif // Allow skylake-x tier AVX-512 bool m_use_avx512 = false;