From 4cca436e300db5e6429aa8f041f4dbbcfdecf1b1 Mon Sep 17 00:00:00 2001 From: Jamie Cunliffe Date: Tue, 17 Jan 2023 15:49:20 +0000 Subject: [PATCH] Tie neon with fp-armv8. In #91608 the fp-armv8 feature was removed as it's tied to the neon feature. However disabling neon didn't actually disable the use of floating point registers and instructions, for this `-fp-armv8` is required. --- compiler/rustc_codegen_llvm/src/llvm_util.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 994addf12eb24..abf46b914b787 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -163,8 +163,10 @@ pub fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> SmallVec<[&'a str; 2] ("aarch64", "pmuv3") => smallvec!["perfmon"], ("aarch64", "paca") => smallvec!["pauth"], ("aarch64", "pacg") => smallvec!["pauth"], - // Rust ties fp and neon together. In LLVM neon implicitly enables fp, - // but we manually enable neon when a feature only implicitly enables fp + // Rust ties fp and neon together. + ("aarch64", "neon") => smallvec!["neon", "fp-armv8"], + // In LLVM neon implicitly enables fp, but we manually enable + // neon when a feature only implicitly enables fp ("aarch64", "f32mm") => smallvec!["f32mm", "neon"], ("aarch64", "f64mm") => smallvec!["f64mm", "neon"], ("aarch64", "fhm") => smallvec!["fp16fml", "neon"],