Skip to content

Commit a2ffe8b

Browse files
committed
unify and deduplicate floats
1 parent b08c11d commit a2ffe8b

File tree

8 files changed

+693
-1353
lines changed

8 files changed

+693
-1353
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
From aacbac292e8b470c8be0e284f3005192f94a0481 Mon Sep 17 00:00:00 2001
2+
From: xonx <119700621+xonx4l@users.noreply.github.com>
3+
Date: Tue, 13 Jan 2026 17:20:06 +0000
4+
Subject: [PATCH] Disable f16 math tests for cranelift
5+
6+
---
7+
coretests/tests/floats/mod.rs | 26 +++++++++++++-------------
8+
1 file changed, 13 insertions(+), 13 deletions(-)
9+
10+
diff --git a/coretests/tests/floats/mod.rs b/coretests/tests/floats/mod.rs
11+
index 58892b3daa6..dc3da4a3311 100644
12+
--- a/coretests/tests/floats/mod.rs
13+
+++ b/coretests/tests/floats/mod.rs
14+
@@ -1536,7 +1536,7 @@ fn s_nan() -> Float {
15+
name: powf,
16+
attrs: {
17+
const: #[cfg(false)],
18+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
19+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
20+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
21+
},
22+
test<Float> {
23+
@@ -1559,7 +1559,7 @@ fn s_nan() -> Float {
24+
name: exp,
25+
attrs: {
26+
const: #[cfg(false)],
27+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
28+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
29+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
30+
},
31+
test<Float> {
32+
@@ -1580,7 +1580,7 @@ fn s_nan() -> Float {
33+
name: exp2,
34+
attrs: {
35+
const: #[cfg(false)],
36+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
37+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
38+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
39+
},
40+
test<Float> {
41+
@@ -1600,7 +1600,7 @@ fn s_nan() -> Float {
42+
name: ln,
43+
attrs: {
44+
const: #[cfg(false)],
45+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
46+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
47+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
48+
},
49+
test<Float> {
50+
@@ -1622,7 +1622,7 @@ fn s_nan() -> Float {
51+
name: log,
52+
attrs: {
53+
const: #[cfg(false)],
54+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
55+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
56+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
57+
},
58+
test<Float> {
59+
@@ -1647,7 +1647,7 @@ fn s_nan() -> Float {
60+
name: log2,
61+
attrs: {
62+
const: #[cfg(false)],
63+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
64+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
65+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
66+
},
67+
test<Float> {
68+
@@ -1670,7 +1670,7 @@ fn s_nan() -> Float {
69+
name: log10,
70+
attrs: {
71+
const: #[cfg(false)],
72+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
73+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
74+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
75+
},
76+
test<Float> {
77+
@@ -1694,7 +1694,7 @@ fn s_nan() -> Float {
78+
name: asinh,
79+
attrs: {
80+
const: #[cfg(false)],
81+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
82+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
83+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
84+
},
85+
test<Float> {
86+
@@ -1725,7 +1725,7 @@ fn s_nan() -> Float {
87+
name: acosh,
88+
attrs: {
89+
const: #[cfg(false)],
90+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
91+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
92+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
93+
},
94+
test<Float> {
95+
@@ -1752,7 +1752,7 @@ fn s_nan() -> Float {
96+
name: atanh,
97+
attrs: {
98+
const: #[cfg(false)],
99+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
100+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
101+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
102+
},
103+
test<Float> {
104+
@@ -1778,7 +1778,7 @@ fn s_nan() -> Float {
105+
name: gamma,
106+
attrs: {
107+
const: #[cfg(false)],
108+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
109+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
110+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
111+
},
112+
test<Float> {
113+
@@ -1804,7 +1804,7 @@ fn s_nan() -> Float {
114+
name: ln_gamma,
115+
attrs: {
116+
const: #[cfg(false)],
117+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
118+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
119+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
120+
},
121+
test<Float> {
122+
@@ -1942,7 +1942,7 @@ fn s_nan() -> Float {
123+
attrs: {
124+
// FIXME(f16_f128): add math tests when available
125+
const: #[cfg(false)],
126+
- f16: #[cfg(any(miri, target_has_reliable_f16_math))],
127+
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
128+
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
129+
},
130+
test<Float> {
131+
--
132+
2.50.1
133+

0 commit comments

Comments
 (0)