@@ -1693,14 +1693,9 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
16931693 let _icx = push_ctxt ( "trans_eager_binop" ) ;
16941694
16951695 let tcx = bcx. tcx ( ) ;
1696- let is_simd = lhs_t. is_simd ( ) ;
1697- let intype = if is_simd {
1698- lhs_t. simd_type ( tcx)
1699- } else {
1700- lhs_t
1701- } ;
1702- let is_float = intype. is_fp ( ) ;
1703- let is_signed = intype. is_signed ( ) ;
1696+ assert ! ( !lhs_t. is_simd( ) ) ;
1697+ let is_float = lhs_t. is_fp ( ) ;
1698+ let is_signed = lhs_t. is_signed ( ) ;
17041699 let info = expr_info ( binop_expr) ;
17051700
17061701 let binop_debug_loc = binop_expr. debug_loc ( ) ;
@@ -1710,8 +1705,6 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
17101705 ast:: BiAdd => {
17111706 if is_float {
17121707 FAdd ( bcx, lhs, rhs, binop_debug_loc)
1713- } else if is_simd {
1714- Add ( bcx, lhs, rhs, binop_debug_loc)
17151708 } else {
17161709 let ( newbcx, res) = with_overflow_check (
17171710 bcx, OverflowOp :: Add , info, lhs_t, lhs, rhs, binop_debug_loc) ;
@@ -1722,8 +1715,6 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
17221715 ast:: BiSub => {
17231716 if is_float {
17241717 FSub ( bcx, lhs, rhs, binop_debug_loc)
1725- } else if is_simd {
1726- Sub ( bcx, lhs, rhs, binop_debug_loc)
17271718 } else {
17281719 let ( newbcx, res) = with_overflow_check (
17291720 bcx, OverflowOp :: Sub , info, lhs_t, lhs, rhs, binop_debug_loc) ;
@@ -1734,8 +1725,6 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
17341725 ast:: BiMul => {
17351726 if is_float {
17361727 FMul ( bcx, lhs, rhs, binop_debug_loc)
1737- } else if is_simd {
1738- Mul ( bcx, lhs, rhs, binop_debug_loc)
17391728 } else {
17401729 let ( newbcx, res) = with_overflow_check (
17411730 bcx, OverflowOp :: Mul , info, lhs_t, lhs, rhs, binop_debug_loc) ;
@@ -1828,11 +1817,7 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
18281817 res
18291818 }
18301819 ast:: BiEq | ast:: BiNe | ast:: BiLt | ast:: BiGe | ast:: BiLe | ast:: BiGt => {
1831- if is_simd {
1832- base:: compare_simd_types ( bcx, lhs, rhs, intype, val_ty ( lhs) , op. node , binop_debug_loc)
1833- } else {
1834- base:: compare_scalar_types ( bcx, lhs, rhs, intype, op. node , binop_debug_loc)
1835- }
1820+ base:: compare_scalar_types ( bcx, lhs, rhs, lhs_t, op. node , binop_debug_loc)
18361821 }
18371822 _ => {
18381823 bcx. tcx ( ) . sess . span_bug ( binop_expr. span , "unexpected binop" ) ;
@@ -2533,14 +2518,7 @@ fn build_unchecked_rshift<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
25332518 let rhs = base:: cast_shift_expr_rhs ( bcx, ast:: BinOp_ :: BiShr , lhs, rhs) ;
25342519 // #1877, #10183: Ensure that input is always valid
25352520 let rhs = shift_mask_rhs ( bcx, rhs, binop_debug_loc) ;
2536- let tcx = bcx. tcx ( ) ;
2537- let is_simd = lhs_t. is_simd ( ) ;
2538- let intype = if is_simd {
2539- lhs_t. simd_type ( tcx)
2540- } else {
2541- lhs_t
2542- } ;
2543- let is_signed = intype. is_signed ( ) ;
2521+ let is_signed = lhs_t. is_signed ( ) ;
25442522 if is_signed {
25452523 AShr ( bcx, lhs, rhs, binop_debug_loc)
25462524 } else {
0 commit comments