diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2024-09-13 13:36:32 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2024-09-15 16:40:23 -0700 |
| commit | ab8c2025279077fcfb0992c455bb8c173b2d9e53 (patch) | |
| tree | 634e10872164f0b0009ab375f43659ca1006a33a /compiler/rustc_codegen_llvm/src/intrinsic.rs | |
| parent | 0307e401c26699656ae08e3809e7d272f5c103f4 (diff) | |
| download | rust-ab8c2025279077fcfb0992c455bb8c173b2d9e53.tar.gz rust-ab8c2025279077fcfb0992c455bb8c173b2d9e53.zip | |
Use -0.0 in `intrinsics::simd::reduce_add_unordered`
-0.0 is the actual neutral additive float, not +0.0, and this matters to codegen.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/intrinsic.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/intrinsic.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs index 05fb77a193a..b79bfd8a1cd 100644 --- a/compiler/rustc_codegen_llvm/src/intrinsic.rs +++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs @@ -2090,14 +2090,14 @@ fn generic_simd_intrinsic<'ll, 'tcx>( }; } - arith_red!(simd_reduce_add_ordered: vector_reduce_add, vector_reduce_fadd, true, add, 0.0); + arith_red!(simd_reduce_add_ordered: vector_reduce_add, vector_reduce_fadd, true, add, -0.0); arith_red!(simd_reduce_mul_ordered: vector_reduce_mul, vector_reduce_fmul, true, mul, 1.0); arith_red!( simd_reduce_add_unordered: vector_reduce_add, vector_reduce_fadd_reassoc, false, add, - 0.0 + -0.0 ); arith_red!( simd_reduce_mul_unordered: vector_reduce_mul, |
