From 6e4320e69f3ab0c18d088564843038721072d0f7 Mon Sep 17 00:00:00 2001 From: sirasistant Date: Fri, 9 Feb 2024 14:24:01 +0000 Subject: [PATCH] fix: bug in brillig gen --- compiler/noirc_evaluator/src/brillig/brillig_ir.rs | 5 ++++- tooling/debugger/ignored-tests.txt | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/noirc_evaluator/src/brillig/brillig_ir.rs b/compiler/noirc_evaluator/src/brillig/brillig_ir.rs index 035b9b0150..94656ed6f4 100644 --- a/compiler/noirc_evaluator/src/brillig/brillig_ir.rs +++ b/compiler/noirc_evaluator/src/brillig/brillig_ir.rs @@ -916,8 +916,11 @@ impl BrilligContext { // // This means that the arguments will be in the first `n` registers after // the number of reserved registers. - let (sources, destinations) = + let (sources, destinations): (Vec<_>, Vec<_>) = arguments.iter().enumerate().map(|(i, argument)| (*argument, self.register(i))).unzip(); + destinations + .iter() + .for_each(|destination| self.registers.ensure_register_is_allocated(*destination)); self.mov_registers_to_registers_instruction(sources, destinations); saved_registers } diff --git a/tooling/debugger/ignored-tests.txt b/tooling/debugger/ignored-tests.txt index 3fb443ebb7..94bf0f91b5 100644 --- a/tooling/debugger/ignored-tests.txt +++ b/tooling/debugger/ignored-tests.txt @@ -16,5 +16,4 @@ scalar_mul signed_comparison simple_2d_array to_bytes_integration -bigint -brillig_slices \ No newline at end of file +bigint \ No newline at end of file