From b2858f313299f812915e5de4d68874d27149be8a Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Sat, 24 May 2025 19:20:17 +0800 Subject: [PATCH] Add `loongarch64` with `d` feature to `f32::midpoint` fast path This patch enables the optimized implementation of `f32::midpoint` for `loongarch64` targets that support the `d`feature. Targets with reliable 64-bit float support can safely use the faster and more accurate computation via `f64`, avoiding the fallback branchy version. --- library/core/src/num/f32.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs index bf67b6ed05afb..6636054a659b5 100644 --- a/library/core/src/num/f32.rs +++ b/library/core/src/num/f32.rs @@ -999,6 +999,7 @@ impl f32 { target_arch = "x86_64", target_arch = "aarch64", all(any(target_arch = "riscv32", target_arch = "riscv64"), target_feature = "d"), + all(target_arch = "loongarch64", target_feature = "d"), all(target_arch = "arm", target_feature = "vfp2"), target_arch = "wasm32", target_arch = "wasm64",