@@ -141,7 +141,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
141
141
// FIXME: should we check for validity here? It's tricky because we do not have a
142
142
// place. Codegen does not seem to set any attributes like `noundef` for intrinsic
143
143
// calls, so we don't *have* to do anything.
144
- let branch: bool = this. machine . rng . get_mut ( ) . gen ( ) ;
144
+ let branch: bool = this. machine . rng . get_mut ( ) . random ( ) ;
145
145
this. write_scalar ( Scalar :: from_bool ( branch) , dest) ?;
146
146
}
147
147
@@ -289,7 +289,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
289
289
let a = this. read_scalar ( a) ?. to_f32 ( ) ?;
290
290
let b = this. read_scalar ( b) ?. to_f32 ( ) ?;
291
291
let c = this. read_scalar ( c) ?. to_f32 ( ) ?;
292
- let fuse: bool = this. machine . rng . get_mut ( ) . gen ( ) ;
292
+ let fuse: bool = this. machine . rng . get_mut ( ) . random ( ) ;
293
293
let res = if fuse {
294
294
// FIXME: Using host floats, to work around https://github.com/rust-lang/rustc_apfloat/issues/11
295
295
a. to_host ( ) . mul_add ( b. to_host ( ) , c. to_host ( ) ) . to_soft ( )
@@ -304,7 +304,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
304
304
let a = this. read_scalar ( a) ?. to_f64 ( ) ?;
305
305
let b = this. read_scalar ( b) ?. to_f64 ( ) ?;
306
306
let c = this. read_scalar ( c) ?. to_f64 ( ) ?;
307
- let fuse: bool = this. machine . rng . get_mut ( ) . gen ( ) ;
307
+ let fuse: bool = this. machine . rng . get_mut ( ) . random ( ) ;
308
308
let res = if fuse {
309
309
// FIXME: Using host floats, to work around https://github.com/rust-lang/rustc_apfloat/issues/11
310
310
a. to_host ( ) . mul_add ( b. to_host ( ) , c. to_host ( ) ) . to_soft ( )
0 commit comments