Enable `f16` tests on x86 and x86-64 · patricklam/verify-rust-std@da02e8b
@@ -103,9 +103,9 @@ fn main() {
103103("arm64ec", _) => false,
104104// MinGW ABI bugs <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054>
105105("x86_64", "windows") => false,
106-// x86 has ABI bugs that show up with optimizations. This should be partially fixed with
107-// the compiler-builtins update. <https://github.com/rust-lang/rust/issues/123885>
108-("x86" | "x86_64", _) => false,
106+// Apple has a special ABI for `f16` that we do not yet support
107+// FIXME(builtins): fixed by <https://github.com/rust-lang/compiler-builtins/pull/675>
108+("x86" | "x86_64", _) if target_vendor == "apple" => false,
109109// Missing `__gnu_h2f_ieee` and `__gnu_f2h_ieee`
110110("powerpc" | "powerpc64", _) => false,
111111// Missing `__gnu_h2f_ieee` and `__gnu_f2h_ieee`
@@ -140,17 +140,17 @@ fn main() {
140140 _ => false,
141141};
142142143-// These are currently empty, but will fill up as some platforms move from completely
144-// unreliable to reliable basics but unreliable math.
143+// Configure platforms that have reliable basics but may have unreliable math.
145144146145// LLVM is currenlty adding missing routines, <https://github.com/llvm/llvm-project/issues/93566>
147146let has_reliable_f16_math = has_reliable_f16
148147&& match (target_arch.as_str(), target_os.as_str()) {
149148// FIXME: Disabled on Miri as the intrinsics are not implemented yet.
150149 _ if is_miri => false,
151-// Currently nothing special. Hooray!
152-// This will change as platforms gain better better support for standard ops but math
153-// lags behind.
150+// x86 has a crash for `powi`: <https://github.com/llvm/llvm-project/issues/105747>
151+("x86" | "x86_64", _) => false,
152+// Assume that working `f16` means working `f16` math for most platforms, since
153+// operations just go through `f32`.
154154 _ => true,
155155};
156156