diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2025-02-23 14:30:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-23 14:30:25 -0500 |
| commit | a2bb4d748db15454900f5830cfc6ab1c7311ea8b (patch) | |
| tree | 8de549d2a4c71a53a6a5e9bc96216c4a657b3b12 /tests/codegen | |
| parent | 31719b59c87272e956e0855bf96e7f9239f46150 (diff) | |
| parent | b9d0555d11736f96b4fbbb83bfed94a7098a9ba7 (diff) | |
Rollup merge of #136543 - RalfJung:round-ties-even, r=tgross35
intrinsics: unify rint, roundeven, nearbyint in a single round_ties_even intrinsic LLVM has three intrinsics here that all do the same thing (when used in the default FP environment). There's no reason Rust needs to copy that historically-grown mess -- let's just have one intrinsic and leave it up to the LLVM backend to decide how to lower that. Suggested by `@hanna-kruppe` in https://github.com/rust-lang/rust/issues/136459; Cc `@tgross35` try-job: test-various
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/intrinsics/nearby.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/codegen/intrinsics/nearby.rs b/tests/codegen/intrinsics/nearby.rs deleted file mode 100644 index 520fe2f1886..00000000000 --- a/tests/codegen/intrinsics/nearby.rs +++ /dev/null @@ -1,18 +0,0 @@ -#![crate_type = "lib"] -#![feature(core_intrinsics)] - -use std::intrinsics; - -// CHECK-LABEL: @nearbyintf32 -#[no_mangle] -pub unsafe fn nearbyintf32(a: f32) -> f32 { - // CHECK: llvm.nearbyint.f32 - intrinsics::nearbyintf32(a) -} - -// CHECK-LABEL: @nearbyintf64 -#[no_mangle] -pub unsafe fn nearbyintf64(a: f64) -> f64 { - // CHECK: llvm.nearbyint.f64 - intrinsics::nearbyintf64(a) -} |
