From ddf4d87f6219e9629f0c45b5f265d99fa235c509 Mon Sep 17 00:00:00 2001 From: Tom French Date: Mon, 21 Aug 2023 09:12:53 +0100 Subject: [PATCH] chore: remove unnecessary check for constant sum --- .../src/ssa/acir_gen/acir_ir/acir_variable.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs b/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs index cdb17ac8923..2facd199b89 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs @@ -454,11 +454,6 @@ impl AcirContext { let rhs_expr = self.var_to_expression(rhs)?; let sum_expr = &lhs_expr + &rhs_expr; - if let Some(constant) = sum_expr.to_const() { - let result = self.add_constant(constant); - return Ok(result); - } - Ok(self.add_data(AcirVarData::from(sum_expr))) }