diff --git a/extensions/native/compiler/src/asm/compiler.rs b/extensions/native/compiler/src/asm/compiler.rs index 518b2b241..afc273938 100644 --- a/extensions/native/compiler/src/asm/compiler.rs +++ b/extensions/native/compiler/src/asm/compiler.rs @@ -835,6 +835,7 @@ impl + TwoAdicField> IfCom } } +// Zipped for loop -- loop extends over the first entry in starts and ends pub struct ZipForCompiler<'a, F: Field, EF> { compiler: &'a mut AsmCompiler, starts: Vec>, @@ -890,23 +891,22 @@ impl + TwoAdicField> }); self.compiler.basic_block(); - self.ends - .iter() - .zip(self.loop_vars.iter()) - .for_each(|(end, loop_var)| match end { - RVar::Const(end) => { - self.compiler.push( - AsmInstruction::BneI(loop_label, loop_var.fp(), *end), - debug_info.clone(), - ); - } - RVar::Val(end) => { - self.compiler.push( - AsmInstruction::Bne(loop_label, loop_var.fp(), end.fp()), - debug_info.clone(), - ); - } - }); + let end = self.ends[0]; + let loop_var = self.loop_vars[0]; + match end { + RVar::Const(end) => { + self.compiler.push( + AsmInstruction::BneI(loop_label, loop_var.fp(), end), + debug_info.clone(), + ); + } + RVar::Val(end) => { + self.compiler.push( + AsmInstruction::Bne(loop_label, loop_var.fp(), end.fp()), + debug_info.clone(), + ); + } + }; let label = self.compiler.block_label(); let instr = AsmInstruction::j(label); diff --git a/extensions/native/recursion/src/fri/mod.rs b/extensions/native/recursion/src/fri/mod.rs index f6da3f928..364505200 100644 --- a/extensions/native/recursion/src/fri/mod.rs +++ b/extensions/native/recursion/src/fri/mod.rs @@ -202,6 +202,8 @@ pub fn verify_batch( let sibling = builder.iter_ptr_get(&proof, ptr_vec[0]).ptr(); let bit = builder.iter_ptr_get(&index_bits, ptr_vec[1]); + builder.print_v(sibling.address); + builder.if_eq(bit, C::N::ONE).then_or_else( |builder| { builder.assign(&left, sibling);