File tree 1 file changed +3
-17
lines changed
1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -472,25 +472,11 @@ fn codegen_regular_intrinsic_call<'tcx>(
472
472
ret. write_cvalue ( fx, CValue :: by_val ( align, usize_layout) ) ;
473
473
}
474
474
475
- sym:: unchecked_add
476
- | sym:: unchecked_sub
477
- | sym:: unchecked_mul
478
- | sym:: exact_div
479
- | sym:: unchecked_shl
480
- | sym:: unchecked_shr => {
475
+ sym:: exact_div => {
481
476
intrinsic_args ! ( fx, args => ( x, y) ; intrinsic) ;
482
477
483
- // FIXME trap on overflow
484
- let bin_op = match intrinsic {
485
- sym:: unchecked_add => BinOp :: Add ,
486
- sym:: unchecked_sub => BinOp :: Sub ,
487
- sym:: unchecked_mul => BinOp :: Mul ,
488
- sym:: exact_div => BinOp :: Div ,
489
- sym:: unchecked_shl => BinOp :: Shl ,
490
- sym:: unchecked_shr => BinOp :: Shr ,
491
- _ => unreachable ! ( ) ,
492
- } ;
493
- let res = crate :: num:: codegen_int_binop ( fx, bin_op, x, y) ;
478
+ // FIXME trap on inexact
479
+ let res = crate :: num:: codegen_int_binop ( fx, BinOp :: Div , x, y) ;
494
480
ret. write_cvalue ( fx, res) ;
495
481
}
496
482
sym:: saturating_add | sym:: saturating_sub => {
You can’t perform that action at this time.
0 commit comments