Skip to content

Commit a576919

Browse files
committed
Remove special case in rvalue codegen.
1 parent e9c73ea commit a576919

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

compiler/rustc_codegen_ssa/src/mir/rvalue.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -652,18 +652,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
652652
rhs: Bx::Value,
653653
input_ty: Ty<'tcx>,
654654
) -> OperandValue<Bx::Value> {
655-
// This case can currently arise only from functions marked
656-
// with #[rustc_inherit_overflow_checks] and inlined from
657-
// another crate (mostly core::num generic/#[inline] fns),
658-
// while the current crate doesn't use overflow checks.
659-
//
660-
// As an optimization, we emit an unchecked binop when overflow checks are disabled,
661-
// as the overflow flag would be ignored anyway.
662-
if !bx.cx().check_overflow() {
663-
let val = self.codegen_scalar_binop(bx, op, lhs, rhs, input_ty);
664-
return OperandValue::Pair(val, bx.cx().const_bool(false));
665-
}
666-
667655
let (val, of) = match op {
668656
// These are checked using intrinsics
669657
mir::BinOp::Add | mir::BinOp::Sub | mir::BinOp::Mul => {

0 commit comments

Comments
 (0)