about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-23 23:49:11 +0000
committerbors <bors@rust-lang.org>2025-02-23 23:49:11 +0000
commit9af8985e059071ea2e0566969a4f140eca73fca9 (patch)
treeba685121e522acccaa15e56fb8ff2bbba147127a /compiler/rustc_codegen_cranelift/src
parentf8a913b1381e90379c7ca63ac2b88b9518936628 (diff)
parent18ffee2126f71fe15a677d718bd27c501b0ccf52 (diff)
downloadrust-9af8985e059071ea2e0566969a4f140eca73fca9.tar.gz
rust-9af8985e059071ea2e0566969a4f140eca73fca9.zip
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
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
-rw-r--r--compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
index 26f14532b45..4d9bed8652c 100644
--- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
@@ -340,14 +340,10 @@ fn codegen_float_intrinsic_call<'tcx>(
         sym::ceilf64 => ("ceil", 1, fx.tcx.types.f64, types::F64),
         sym::truncf32 => ("truncf", 1, fx.tcx.types.f32, types::F32),
         sym::truncf64 => ("trunc", 1, fx.tcx.types.f64, types::F64),
-        sym::rintf32 => ("rintf", 1, fx.tcx.types.f32, types::F32),
-        sym::rintf64 => ("rint", 1, fx.tcx.types.f64, types::F64),
+        sym::round_ties_even_f32 => ("rintf", 1, fx.tcx.types.f32, types::F32),
+        sym::round_ties_even_f64 => ("rint", 1, fx.tcx.types.f64, types::F64),
         sym::roundf32 => ("roundf", 1, fx.tcx.types.f32, types::F32),
         sym::roundf64 => ("round", 1, fx.tcx.types.f64, types::F64),
-        sym::roundevenf32 => ("roundevenf", 1, fx.tcx.types.f32, types::F32),
-        sym::roundevenf64 => ("roundeven", 1, fx.tcx.types.f64, types::F64),
-        sym::nearbyintf32 => ("nearbyintf", 1, fx.tcx.types.f32, types::F32),
-        sym::nearbyintf64 => ("nearbyint", 1, fx.tcx.types.f64, types::F64),
         sym::sinf32 => ("sinf", 1, fx.tcx.types.f32, types::F32),
         sym::sinf64 => ("sin", 1, fx.tcx.types.f64, types::F64),
         sym::cosf32 => ("cosf", 1, fx.tcx.types.f32, types::F32),
@@ -399,8 +395,8 @@ fn codegen_float_intrinsic_call<'tcx>(
         | sym::ceilf64
         | sym::truncf32
         | sym::truncf64
-        | sym::nearbyintf32
-        | sym::nearbyintf64
+        | sym::round_ties_even_f32
+        | sym::round_ties_even_f64
         | sym::sqrtf32
         | sym::sqrtf64 => {
             let val = match intrinsic {
@@ -408,7 +404,9 @@ fn codegen_float_intrinsic_call<'tcx>(
                 sym::floorf32 | sym::floorf64 => fx.bcx.ins().floor(args[0]),
                 sym::ceilf32 | sym::ceilf64 => fx.bcx.ins().ceil(args[0]),
                 sym::truncf32 | sym::truncf64 => fx.bcx.ins().trunc(args[0]),
-                sym::nearbyintf32 | sym::nearbyintf64 => fx.bcx.ins().nearest(args[0]),
+                sym::round_ties_even_f32 | sym::round_ties_even_f64 => {
+                    fx.bcx.ins().nearest(args[0])
+                }
                 sym::sqrtf32 | sym::sqrtf64 => fx.bcx.ins().sqrt(args[0]),
                 _ => unreachable!(),
             };