[llvm] [AArch64] Fix zero-call-used-regs crash on targets without NEON (PR #211603)
Akshay K via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 30 06:58:58 PDT 2026
================
@@ -11342,10 +11342,12 @@ void AArch64InstrInfo::buildClearRegister(Register Reg, MachineBasicBlock &MBB,
BuildMI(MBB, Iter, DL, get(AArch64::MOVIv2d_ns), Reg)
.addImm(0);
} else {
- // This is a streaming-compatible function without SVE. We don't have full
- // Neon (just FPRs), so we can at most use the first 64-bit sub-register.
- // So given `movi v..` would be illegal use `fmov d..` instead.
- assert(STI.hasNEON() && "Expected to have NEON.");
+ // FP registers without full Neon: a streaming-compatible function without
+ // SVE, or a target with FP but no Advanced SIMD (+nosimd). Only the first
+ // 64-bit sub-register is usable, so clear it with a base-FP fmov instead of
----------------
kumarak wrote:
Thanks @efriedma-quic for pointing this out. The comment does seem misleading. I wanted to say that with no NEON, only 64-bit can be used for operations, and there is no mov immediate available for 128-bit registers, and we use `fmov` to clear. Updated my comments.
https://github.com/llvm/llvm-project/pull/211603
More information about the llvm-commits
mailing list