Skip to content

Commit

Permalink
Disable f16 on AArch64 without the neon feature
Browse files Browse the repository at this point in the history
There is an LLVM regression that breaks some `f16`-related code when
`fp-armv8` is disabled [1]. Since Rust ties that feature to `neon`,
disable `f16` if `neon` is not available.

[1]: llvm/llvm-project#129394
  • Loading branch information
tgross35 committed Mar 1, 2025
1 parent 3c7672c commit 5cf417a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ pub fn configure_f16_f128(target: &Target) {
let f16_enabled = match target.arch.as_str() {
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
"arm64ec" => false,
// Crash in LLVM20 <https://github.com/llvm/llvm-project/issues/129394>
"aarch64" if !target.features.iter().any(|f| f == "neon") => false,
// Selection failure <https://github.com/llvm/llvm-project/issues/50374>
"s390x" => false,
// Infinite recursion <https://github.com/llvm/llvm-project/issues/97981>
Expand Down

0 comments on commit 5cf417a

Please sign in to comment.