From d25972e196615c99afa04567e91fb5d81f9af1f6 Mon Sep 17 00:00:00 2001 From: Rad0van Date: Sat, 6 Jun 2026 10:30:55 +0200 Subject: [PATCH] JIT/AArch64: advertise +i8mm to the LLVM target machine The PPU/SPU recompilers emit i8mm intrinsics (ummla/smmla, used by the SPU GBB/GBH gather paths) gated on utils::has_i8mm(). The JIT's MAttrs list mirrored dotprod/sha3/sve from HWCAP but never added i8mm, and the resolved -mcpu on Apple silicon is the cortex-a78 fallback (no i8mm), so the backend aborted with "Cannot select: intrinsic %llvm.aarch64.neon.ummla" on every game. Mirror i8mm into MAttrs like the other features. Co-Authored-By: Claude Opus 4.8 (1M context) (cherry picked from commit 52d121fee79cc569c9ac273852edd0e493ae51fc) --- Utilities/JITLLVM.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Utilities/JITLLVM.cpp b/Utilities/JITLLVM.cpp index 31fb769c5a..66a7d3e678 100644 --- a/Utilities/JITLLVM.cpp +++ b/Utilities/JITLLVM.cpp @@ -750,6 +750,15 @@ jit_compiler::jit_compiler(const std::unordered_map& _link, co else attributes.push_back("-dotprod"); + // The recompilers emit i8mm intrinsics (e.g. ummla) gated on utils::has_i8mm(). + // The JIT target features must advertise i8mm too, otherwise the backend fails + // with "Cannot select: intrinsic %llvm.aarch64.neon.ummla" whenever the resolved + // -mcpu does not already imply it (e.g. the cortex-a78 fallback on Apple silicon). + if (utils::has_i8mm()) + attributes.push_back("+i8mm"); + else + attributes.push_back("-i8mm"); + if (utils::has_sve()) attributes.push_back("+sve"); else