about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-02-18 22:06:29 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-02-18 22:06:29 +0000
commit9f6c1df8723504d7d468c87af02670dd0067cc7b (patch)
treec5184372a66e2aed1726a4c587295c3ceb527c65 /compiler/rustc_const_eval/src
parent7e795bdf03bd75cb9e502f5cdeac693da2f24dc7 (diff)
downloadrust-9f6c1df8723504d7d468c87af02670dd0067cc7b.tar.gz
rust-9f6c1df8723504d7d468c87af02670dd0067cc7b.zip
Stop implementing _with_overflow intrinsics in codegen backends.
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/interpret/intrinsics.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
index d18d9bb5a98..c5d558aeb6c 100644
--- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs
+++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
@@ -210,17 +210,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
                 let out_val = numeric_intrinsic(intrinsic_name, bits, kind);
                 self.write_scalar(out_val, dest)?;
             }
-            sym::add_with_overflow | sym::sub_with_overflow | sym::mul_with_overflow => {
-                let lhs = self.read_immediate(&args[0])?;
-                let rhs = self.read_immediate(&args[1])?;
-                let bin_op = match intrinsic_name {
-                    sym::add_with_overflow => BinOp::Add,
-                    sym::sub_with_overflow => BinOp::Sub,
-                    sym::mul_with_overflow => BinOp::Mul,
-                    _ => bug!(),
-                };
-                self.binop_with_overflow(bin_op, &lhs, &rhs, dest)?;
-            }
             sym::saturating_add | sym::saturating_sub => {
                 let l = self.read_immediate(&args[0])?;
                 let r = self.read_immediate(&args[1])?;