diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-03-11 08:08:53 +0000 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-04-29 05:39:15 +0000 |
| commit | 19e82b43eba982b30ecc5794757bd1604fbbce14 (patch) | |
| tree | 20dcb33c676c1ae113f64c81269d16f3de158426 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | 1b8ab72680f36e783af84c1a3c4f8508572bd9f9 (diff) | |
| download | rust-19e82b43eba982b30ecc5794757bd1604fbbce14.tar.gz rust-19e82b43eba982b30ecc5794757bd1604fbbce14.zip | |
Enable `target_has_reliable_f16_math` on x86
This has been disabled due to an LLVM misoptimization with `powi.f16` [1]. This was fixed upstream and the fix is included in LLVM20, so tests no longer need to be disabled. `f16` still remains disabled on MinGW due to the ABI issue. [1]: https://github.com/llvm/llvm-project/issues/98665
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index ae1bdac1655..6412a537a79 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -466,13 +466,9 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) { _ => true, }; - cfg.has_reliable_f16_math = match (target_arch, target_os) { - // x86 has a crash for `powi`: <https://github.com/llvm/llvm-project/issues/105747> - ("x86" | "x86_64", _) => false, - // Assume that working `f16` means working `f16` math for most platforms, since - // operations just go through `f32`. - _ => true, - } && cfg.has_reliable_f16; + // Assume that working `f16` means working `f16` math for most platforms, since + // operations just go through `f32`. + cfg.has_reliable_f16_math = cfg.has_reliable_f16; cfg.has_reliable_f128_math = match (target_arch, target_os) { // LLVM lowers `fp128` math to `long double` symbols even on platforms where |
