@@ -1693,14 +1693,9 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
1693
1693
let _icx = push_ctxt ( "trans_eager_binop" ) ;
1694
1694
1695
1695
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 ( ) ;
1704
1699
let info = expr_info ( binop_expr) ;
1705
1700
1706
1701
let binop_debug_loc = binop_expr. debug_loc ( ) ;
@@ -1710,8 +1705,6 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
1710
1705
ast:: BiAdd => {
1711
1706
if is_float {
1712
1707
FAdd ( bcx, lhs, rhs, binop_debug_loc)
1713
- } else if is_simd {
1714
- Add ( bcx, lhs, rhs, binop_debug_loc)
1715
1708
} else {
1716
1709
let ( newbcx, res) = with_overflow_check (
1717
1710
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>,
1722
1715
ast:: BiSub => {
1723
1716
if is_float {
1724
1717
FSub ( bcx, lhs, rhs, binop_debug_loc)
1725
- } else if is_simd {
1726
- Sub ( bcx, lhs, rhs, binop_debug_loc)
1727
1718
} else {
1728
1719
let ( newbcx, res) = with_overflow_check (
1729
1720
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>,
1734
1725
ast:: BiMul => {
1735
1726
if is_float {
1736
1727
FMul ( bcx, lhs, rhs, binop_debug_loc)
1737
- } else if is_simd {
1738
- Mul ( bcx, lhs, rhs, binop_debug_loc)
1739
1728
} else {
1740
1729
let ( newbcx, res) = with_overflow_check (
1741
1730
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>,
1828
1817
res
1829
1818
}
1830
1819
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)
1836
1821
}
1837
1822
_ => {
1838
1823
bcx. tcx ( ) . sess . span_bug ( binop_expr. span , "unexpected binop" ) ;
@@ -2533,14 +2518,7 @@ fn build_unchecked_rshift<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
2533
2518
let rhs = base:: cast_shift_expr_rhs ( bcx, ast:: BinOp_ :: BiShr , lhs, rhs) ;
2534
2519
// #1877, #10183: Ensure that input is always valid
2535
2520
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 ( ) ;
2544
2522
if is_signed {
2545
2523
AShr ( bcx, lhs, rhs, binop_debug_loc)
2546
2524
} else {
0 commit comments