From f20103f9f3e35dad241dd81cd3ae9eb2dafb3f44 Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Mon, 2 Sep 2024 14:53:01 +0000 Subject: [PATCH] rustc_codegen_llvm: adapt for LLVM 20 changes No functional changes intended. LLVM 20 uses a different name for this feature. --- compiler/rustc_codegen_llvm/src/llvm_util.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 618602ed70f44..6b2a47c493f6c 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -235,7 +235,9 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option Some(LLVMFeature::new("perfmon")), ("aarch64", "paca") => Some(LLVMFeature::new("pauth")), ("aarch64", "pacg") => Some(LLVMFeature::new("pauth")), - ("aarch64", "sve-b16b16") => Some(LLVMFeature::new("b16b16")), + ("aarch64", "sve-b16b16") => { + Some(LLVMFeature::new(if get_version().0 < 20 { "b16b16" } else { "sve-b16b16" })) + } ("aarch64", "flagm2") => Some(LLVMFeature::new("altnzcv")), // Rust ties fp and neon together. ("aarch64", "neon") => {