Skip to content

Commit 53f9852

Browse files
committed
rustc_target: Add the fp16 target feature for AArch32
1 parent 5ff18d0 commit 53f9852

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

+1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
271271
("aarch64", "fp16") => Some(LLVMFeature::new("fullfp16")),
272272
// Filter out features that are not supported by the current LLVM version
273273
("aarch64", "fpmr") if get_version().0 != 18 => None,
274+
("arm", "fp16") => Some(LLVMFeature::new("fullfp16")),
274275
// In LLVM 18, `unaligned-scalar-mem` was merged with `unaligned-vector-mem` into a single
275276
// feature called `fast-unaligned-access`. In LLVM 19, it was split back out.
276277
("riscv32" | "riscv64", "unaligned-scalar-mem") if get_version().0 == 18 => {

compiler/rustc_target/src/target_features.rs

+1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ const ARM_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
145145
("dotprod", Unstable(sym::arm_target_feature), &["neon"]),
146146
("dsp", Unstable(sym::arm_target_feature), &[]),
147147
("fp-armv8", Unstable(sym::arm_target_feature), &["vfp4"]),
148+
("fp16", Unstable(sym::arm_target_feature), &["neon"]),
148149
("fpregs", Unstable(sym::arm_target_feature), &[]),
149150
("i8mm", Unstable(sym::arm_target_feature), &["neon"]),
150151
("mclass", Unstable(sym::arm_target_feature), &[]),

0 commit comments

Comments
 (0)