Skip to content

Commit 6f5d960

Browse files
committed
Fix miri
1 parent 15e9f56 commit 6f5d960

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

Diff for: src/tools/miri/src/shims/foreign_items.rs

-10
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)