Skip to content

Commit 7250dcf

Browse files
committed
Auto merge of #148206 - xonx4l:deduplicate-float-tests, r=<try>
Deduplicated float tests and unified in floats/mod.rs try-job: aarch64-apple try-job: x86_64-mingw-1
2 parents 1e9be1b + 063a9de commit 7250dcf

8 files changed

Lines changed: 705 additions & 1345 deletions

File tree

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
From 5b3d7ec29a548126de3855b468a5dfe16e226f57 Mon Sep 17 00:00:00 2001
2+
From: xonx <119700621+xonx4l@users.noreply.github.com>
3+
Date: Sat, 31 Jan 2026 10:02:24 +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 c63a7f1eb2c..cf82a43df21 100644
12+
--- a/coretests/tests/floats/mod.rs
13+
+++ b/coretests/tests/floats/mod.rs
14+
@@ -1530,7 +1530,7 @@ fn s_nan() -> Float {
15+
name: powf,
16+
attrs: {
17+
const: #[cfg(false)],
18+
- f16: #[cfg(all(not(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+
@@ -1553,7 +1553,7 @@ fn s_nan() -> Float {
24+
name: exp,
25+
attrs: {
26+
const: #[cfg(false)],
27+
- f16: #[cfg(all(not(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+
@@ -1574,7 +1574,7 @@ fn s_nan() -> Float {
33+
name: exp2,
34+
attrs: {
35+
const: #[cfg(false)],
36+
- f16: #[cfg(all(not(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+
@@ -1594,7 +1594,7 @@ fn s_nan() -> Float {
42+
name: ln,
43+
attrs: {
44+
const: #[cfg(false)],
45+
- f16: #[cfg(all(not(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+
@@ -1616,7 +1616,7 @@ fn s_nan() -> Float {
51+
name: log,
52+
attrs: {
53+
const: #[cfg(false)],
54+
- f16: #[cfg(all(not(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+
@@ -1641,7 +1641,7 @@ fn s_nan() -> Float {
60+
name: log2,
61+
attrs: {
62+
const: #[cfg(false)],
63+
- f16: #[cfg(all(not(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+
@@ -1664,7 +1664,7 @@ fn s_nan() -> Float {
69+
name: log10,
70+
attrs: {
71+
const: #[cfg(false)],
72+
- f16: #[cfg(all(not(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+
@@ -1688,7 +1688,7 @@ fn s_nan() -> Float {
78+
name: asinh,
79+
attrs: {
80+
const: #[cfg(false)],
81+
- f16: #[cfg(all(not(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+
@@ -1721,7 +1721,7 @@ fn s_nan() -> Float {
87+
name: acosh,
88+
attrs: {
89+
const: #[cfg(false)],
90+
- f16: #[cfg(all(not(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+
@@ -1749,7 +1749,7 @@ fn s_nan() -> Float {
96+
name: atanh,
97+
attrs: {
98+
const: #[cfg(false)],
99+
- f16: #[cfg(all(not(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+
@@ -1775,7 +1775,7 @@ fn s_nan() -> Float {
105+
name: gamma,
106+
attrs: {
107+
const: #[cfg(false)],
108+
- f16: #[cfg(all(not(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+
@@ -1806,7 +1806,7 @@ fn s_nan() -> Float {
114+
name: ln_gamma,
115+
attrs: {
116+
const: #[cfg(false)],
117+
- f16: #[cfg(all(not(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+
@@ -2019,7 +2019,7 @@ fn s_nan() -> Float {
123+
attrs: {
124+
// FIXME(f16_f128): add math tests when available
125+
const: #[cfg(false)],
126+
- f16: #[cfg(all(not(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)