Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1bc23f1

Browse files
committedJan 31, 2025
Auto merge of #136367 - workingjubilee:rollup-pud5uj0, r=workingjubilee
Rollup of 16 pull requests Successful merges: - #133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - #135768 (tests: Port `symbol-mangling-hashed` to rmake.rs) - #135836 (bootstrap: only build `crt{begin,end}.o` when compiling to MUSL) - #135840 (omit unused args warnings for intrinsics without body) - #135900 (Manually walk into WF obligations in `BestObligation` proof tree visitor) - #136146 (Explicitly choose x86 softfloat/hardfloat ABI) - #136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - #136163 (Fix off-by-one error causing slice::sort to abort the program) - #136266 (fix broken release notes id) - #136283 (Update encode_utf16 to mention it is native endian) - #136309 (set rustc dylib on manually constructed rustc command) - #136314 (Use proper type when applying deref adjustment in const) - #136339 (CompileTest: Add Directives to Ignore `arm-unknown-*` Targets) - #136348 (miri: make float min/max non-deterministic) - #136351 (Add documentation for derive(CoercePointee)) - #136358 (`#[optimize(none)]` implies `#[inline(never)]`) Failed merges: - #135994 (Rename rustc_middle::Ty::is_unsafe_ptr to is_raw_ptr) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 854f225 + 26a42c1 commit 1bc23f1

File tree

85 files changed

+1405
-793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1405
-793
lines changed
 

‎RELEASES.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ Version 1.84.1 (2025-01-30)
1616
Version 1.84.0 (2025-01-09)
1717
==========================
1818

19-
<a id="
20-
Language"></a>
19+
<a id="1.84.0-Language"></a>
2120

2221
Language
2322
--------

‎compiler/rustc_const_eval/src/interpret/intrinsics.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,13 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
747747
{
748748
let a: F = self.read_scalar(&args[0])?.to_float()?;
749749
let b: F = self.read_scalar(&args[1])?.to_float()?;
750-
let res = self.adjust_nan(a.min(b), &[a, b]);
750+
let res = if a == b {
751+
// They are definitely not NaN (those are never equal), but they could be `+0` and `-0`.
752+
// Let the machine decide which one to return.
753+
M::equal_float_min_max(self, a, b)
754+
} else {
755+
self.adjust_nan(a.min(b), &[a, b])
756+
};
751757
self.write_scalar(res, dest)?;
752758
interp_ok(())
753759
}
@@ -762,7 +768,13 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
762768
{
763769
let a: F = self.read_scalar(&args[0])?.to_float()?;
764770
let b: F = self.read_scalar(&args[1])?.to_float()?;
765-
let res = self.adjust_nan(a.max(b), &[a, b]);
771+
let res = if a == b {
772+
// They are definitely not NaN (those are never equal), but they could be `+0` and `-0`.
773+
// Let the machine decide which one to return.
774+
M::equal_float_min_max(self, a, b)
775+
} else {
776+
self.adjust_nan(a.max(b), &[a, b])
777+
};
766778
self.write_scalar(res, dest)?;
767779
interp_ok(())
768780
}

0 commit comments

Comments
 (0)
Please sign in to comment.