diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-09-15 23:51:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-15 23:51:25 -0700 |
| commit | 68758c05604f0ae4dfbe25f61e70f1a3db083c29 (patch) | |
| tree | a5a0b0691b27a39e3bcf701bb4d8bdfc14817607 /compiler/rustc_codegen_llvm/src/intrinsic.rs | |
| parent | 0151cbe6e8ca1027f5482c98a1b93d70fbd9a50b (diff) | |
| parent | ab8c2025279077fcfb0992c455bb8c173b2d9e53 (diff) | |
| download | rust-68758c05604f0ae4dfbe25f61e70f1a3db083c29.tar.gz rust-68758c05604f0ae4dfbe25f61e70f1a3db083c29.zip | |
Rollup merge of #130325 - workingjubilee:plus-minus-zero-redux, r=RalfJung,jieyouxu
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. try-job: aarch64-gnu
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 9705dd506b9..15c519dfcb4 100644 --- a/compiler/rustc_codegen_llvm/src/intrinsic.rs +++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs @@ -2066,14 +2066,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, |
