Skip to content

Commit 6ac9c34

Browse files
committed
Auto merge of #113843 - wesleywiser:replace_rustc_apfloat, r=pnkfelix
Replace in-tree `rustc_apfloat` with the new version of the crate Replace the in-tree version of `rustc_apfloat` with the new version of the crate which has been correctly licensed. The new crate incorporates upstream changes from LLVM since the original port was done including many correctness fixes and has been extensively fuzz tested to validate correctness. Fixes #100233 Fixes #102403 Fixes #113407 Fixes #113409 Fixes #55993 Fixes #93224 Closes #93225 Closes #109573
2 parents 07ced01 + 90f7aff commit 6ac9c34

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/shims/foreign_items.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -914,16 +914,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
914914
let x = this.read_scalar(x)?.to_f64()?;
915915
let exp = this.read_scalar(exp)?.to_i32()?;
916916

917-
// Saturating cast to i16. Even those are outside the valid exponent range so
918-
// `scalbn` below will do its over/underflow handling.
919-
let exp = if exp > i32::from(i16::MAX) {
920-
i16::MAX
921-
} else if exp < i32::from(i16::MIN) {
922-
i16::MIN
923-
} else {
924-
exp.try_into().unwrap()
925-
};
926-
927917
let res = x.scalbn(exp);
928918
this.write_scalar(Scalar::from_f64(res), dest)?;
929919
}

0 commit comments

Comments
 (0)