@@ -553,7 +553,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
553
553
let this = self . eval_context_mut ( ) ;
554
554
555
555
let old = this. allow_data_races_mut ( |this| this. read_immediate ( & place. into ( ) ) ) ?;
556
- let lt = this. overflowing_binary_op ( mir:: BinOp :: Lt , & old, & rhs) ?. 0 . to_bool ( ) ?;
556
+ let lt = this. binary_op ( mir:: BinOp :: Lt , & old, & rhs) ?. to_scalar ( ) ? . to_bool ( ) ?;
557
557
558
558
let new_val = if min {
559
559
if lt { & old } else { & rhs }
@@ -593,11 +593,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
593
593
// Read as immediate for the sake of `binary_op()`
594
594
let old = this. allow_data_races_mut ( |this| this. read_immediate ( & ( place. into ( ) ) ) ) ?;
595
595
// `binary_op` will bail if either of them is not a scalar.
596
- let eq = this. overflowing_binary_op ( mir:: BinOp :: Eq , & old, expect_old) ?. 0 ;
596
+ let eq = this. binary_op ( mir:: BinOp :: Eq , & old, expect_old) ?;
597
597
// If the operation would succeed, but is "weak", fail some portion
598
598
// of the time, based on `rate`.
599
599
let rate = this. memory . extra . cmpxchg_weak_failure_rate ;
600
- let cmpxchg_success = eq. to_bool ( ) ?
600
+ let cmpxchg_success = eq. to_scalar ( ) ? . to_bool ( ) ?
601
601
&& ( !can_fail_spuriously || this. memory . extra . rng . get_mut ( ) . gen :: < f64 > ( ) < rate) ;
602
602
let res = Immediate :: ScalarPair (
603
603
old. to_scalar_or_uninit ( ) ,
0 commit comments