Skip to content

Commit cbdfa91

Browse files
authored
Rollup merge of #150908 - llvm-f16-cfg, r=nikic
llvm: Update `reliable_f16` configuration for LLVM22 Since yesterday, the LLVM `main` branch should have working `f16` on all platforms that Rust supports; this will be LLVM version 22, so update how `cfg(target_has_reliable_f16)` is set to reflect this. Within the rust-lang organization, this currently has no effect. The goal is to start catching problems as early as possible in external CI that runs top-of-tree rust against top-of-tree LLVM, and once testing for the rust-lang bump to LLVM 22 starts. Hopefully this will mean that we can fix any problems that show up before the bump actually happens, meaning `f16` will be about ready for stabilization at that point (with some considerations for the GCC patch at [1] propagating). References: * llvm/llvm-project@919021b * llvm/llvm-project@054ee2f * llvm/llvm-project@db26ce5 * llvm/llvm-project@549d7c4 * llvm/llvm-project@4903c62 [1]: gcc-mirror/gcc@8b6a18e
2 parents 55383ba + 07fa70e commit cbdfa91

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,19 +379,19 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
379379
{
380380
false
381381
}
382-
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
383-
(Arch::Arm64EC, _) => false,
382+
// Unsupported <https://github.com/llvm/llvm-project/issues/94434> (fixed in llvm22)
383+
(Arch::Arm64EC, _) if major < 22 => false,
384384
// Selection failure <https://github.com/llvm/llvm-project/issues/50374> (fixed in llvm21)
385385
(Arch::S390x, _) if major < 21 => false,
386386
// MinGW ABI bugs <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054>
387387
(Arch::X86_64, Os::Windows) if *target_env == Env::Gnu && *target_abi != Abi::Llvm => false,
388388
// Infinite recursion <https://github.com/llvm/llvm-project/issues/97981>
389-
(Arch::CSky, _) => false,
389+
(Arch::CSky, _) if major < 22 => false, // (fixed in llvm22)
390390
(Arch::Hexagon, _) if major < 21 => false, // (fixed in llvm21)
391391
(Arch::LoongArch32 | Arch::LoongArch64, _) if major < 21 => false, // (fixed in llvm21)
392-
(Arch::PowerPC | Arch::PowerPC64, _) => false,
393-
(Arch::Sparc | Arch::Sparc64, _) => false,
394-
(Arch::Wasm32 | Arch::Wasm64, _) => false,
392+
(Arch::PowerPC | Arch::PowerPC64, _) if major < 22 => false, // (fixed in llvm22)
393+
(Arch::Sparc | Arch::Sparc64, _) if major < 22 => false, // (fixed in llvm22)
394+
(Arch::Wasm32 | Arch::Wasm64, _) if major < 22 => false, // (fixed in llvm22)
395395
// `f16` support only requires that symbols converting to and from `f32` are available. We
396396
// provide these in `compiler-builtins`, so `f16` should be available on all platforms that
397397
// do not have other ABI issues or LLVM crashes.

0 commit comments

Comments
 (0)