@@ -437,13 +437,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
437
437
let val = match ( op. layout . ty . kind ( ) , dest. layout . ty . kind ( ) ) {
438
438
// Int-to-(int|float): always safe
439
439
( ty:: Int ( _) | ty:: Uint ( _) , ty:: Int ( _) | ty:: Uint ( _) | ty:: Float ( _) ) =>
440
- this. misc_cast ( & op, dest. layout . ty ) ?,
440
+ this. int_to_int_or_float ( & op, dest. layout . ty ) ?,
441
441
// Float-to-float: always safe
442
442
( ty:: Float ( _) , ty:: Float ( _) ) =>
443
- this. misc_cast ( & op, dest. layout . ty ) ?,
443
+ this. float_to_float_or_int ( & op, dest. layout . ty ) ?,
444
444
// Float-to-int in safe mode
445
445
( ty:: Float ( _) , ty:: Int ( _) | ty:: Uint ( _) ) if safe_cast =>
446
- this. misc_cast ( & op, dest. layout . ty ) ?,
446
+ this. float_to_float_or_int ( & op, dest. layout . ty ) ?,
447
447
// Float-to-int in unchecked mode
448
448
( ty:: Float ( FloatTy :: F32 ) , ty:: Int ( _) | ty:: Uint ( _) ) if !safe_cast =>
449
449
this. float_to_int_unchecked ( op. to_scalar ( ) . to_f32 ( ) ?, dest. layout . ty ) ?. into ( ) ,
0 commit comments