Skip to content

Commit 3e168d6

Browse files
committed
Auto merge of #137497 - tgross35:rollup-1oeclrr, r=tgross35
Rollup of 8 pull requests Successful merges: - #136439 (Misc. `rustc_codegen_ssa` cleanups 🧹) - #136543 (intrinsics: unify rint, roundeven, nearbyint in a single round_ties_even intrinsic) - #136637 (Add binary_format to rustc target specs) - #137099 (Fix rustdoc test directives that were accidentally ignored 🧐) - #137297 (Update `compiler-builtins` to 0.1.147) - #137451 (FIx `sym` -> `syn` typo in tail-expr-drop-order type opt-out) - #137452 (bootstrap: add module docs for core:metadata) - #137483 (rename sub_ptr to offset_from_unsigned) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 65eef41 + b89359c commit 3e168d6

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ index 7165c3e48af..968552ad435 100644
1616

1717
[dependencies]
1818
core = { path = "../core", public = true }
19-
-compiler_builtins = { version = "=0.1.146", features = ['rustc-dep-of-std'] }
20-
+compiler_builtins = { version = "=0.1.146", features = ['rustc-dep-of-std', 'no-f16-f128'] }
19+
-compiler_builtins = { version = "=0.1.147", features = ['rustc-dep-of-std'] }
20+
+compiler_builtins = { version = "=0.1.147", features = ['rustc-dep-of-std', 'no-f16-f128'] }
2121

2222
[dev-dependencies]
2323
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }

src/intrinsics/mod.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,10 @@ fn codegen_float_intrinsic_call<'tcx>(
340340
sym::ceilf64 => ("ceil", 1, fx.tcx.types.f64, types::F64),
341341
sym::truncf32 => ("truncf", 1, fx.tcx.types.f32, types::F32),
342342
sym::truncf64 => ("trunc", 1, fx.tcx.types.f64, types::F64),
343-
sym::rintf32 => ("rintf", 1, fx.tcx.types.f32, types::F32),
344-
sym::rintf64 => ("rint", 1, fx.tcx.types.f64, types::F64),
343+
sym::round_ties_even_f32 => ("rintf", 1, fx.tcx.types.f32, types::F32),
344+
sym::round_ties_even_f64 => ("rint", 1, fx.tcx.types.f64, types::F64),
345345
sym::roundf32 => ("roundf", 1, fx.tcx.types.f32, types::F32),
346346
sym::roundf64 => ("round", 1, fx.tcx.types.f64, types::F64),
347-
sym::roundevenf32 => ("roundevenf", 1, fx.tcx.types.f32, types::F32),
348-
sym::roundevenf64 => ("roundeven", 1, fx.tcx.types.f64, types::F64),
349-
sym::nearbyintf32 => ("nearbyintf", 1, fx.tcx.types.f32, types::F32),
350-
sym::nearbyintf64 => ("nearbyint", 1, fx.tcx.types.f64, types::F64),
351347
sym::sinf32 => ("sinf", 1, fx.tcx.types.f32, types::F32),
352348
sym::sinf64 => ("sin", 1, fx.tcx.types.f64, types::F64),
353349
sym::cosf32 => ("cosf", 1, fx.tcx.types.f32, types::F32),
@@ -399,16 +395,18 @@ fn codegen_float_intrinsic_call<'tcx>(
399395
| sym::ceilf64
400396
| sym::truncf32
401397
| sym::truncf64
402-
| sym::nearbyintf32
403-
| sym::nearbyintf64
398+
| sym::round_ties_even_f32
399+
| sym::round_ties_even_f64
404400
| sym::sqrtf32
405401
| sym::sqrtf64 => {
406402
let val = match intrinsic {
407403
sym::fabsf32 | sym::fabsf64 => fx.bcx.ins().fabs(args[0]),
408404
sym::floorf32 | sym::floorf64 => fx.bcx.ins().floor(args[0]),
409405
sym::ceilf32 | sym::ceilf64 => fx.bcx.ins().ceil(args[0]),
410406
sym::truncf32 | sym::truncf64 => fx.bcx.ins().trunc(args[0]),
411-
sym::nearbyintf32 | sym::nearbyintf64 => fx.bcx.ins().nearest(args[0]),
407+
sym::round_ties_even_f32 | sym::round_ties_even_f64 => {
408+
fx.bcx.ins().nearest(args[0])
409+
}
412410
sym::sqrtf32 | sym::sqrtf64 => fx.bcx.ins().sqrt(args[0]),
413411
_ => unreachable!(),
414412
};

0 commit comments

Comments
 (0)