From afe58ccc8b80aecadb8c5ab8564d5e87f5d1094c Mon Sep 17 00:00:00 2001 From: jfecher Date: Thu, 8 Jun 2023 14:09:42 -0500 Subject: [PATCH] fix(ssa refactor): Fix constant folding looping forever (#1611) Fix constant folding looping forever --- crates/noirc_evaluator/src/ssa_refactor/opt/constant_folding.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/noirc_evaluator/src/ssa_refactor/opt/constant_folding.rs b/crates/noirc_evaluator/src/ssa_refactor/opt/constant_folding.rs index ffbba71915c..5a36ab799c7 100644 --- a/crates/noirc_evaluator/src/ssa_refactor/opt/constant_folding.rs +++ b/crates/noirc_evaluator/src/ssa_refactor/opt/constant_folding.rs @@ -36,6 +36,7 @@ fn constant_fold(function: &mut Function) { continue; } + context.visited_blocks.insert(block); context.fold_constants_in_block(function, block); } }