Skip to content

Commit 1d349dc

Browse files
Fix circuit implementation
1 parent 33606e4 commit 1d349dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libfuncs/circuit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -740,10 +740,10 @@ fn build_u96_limbs_less_than_guarantee_verify<'ctx, 'this>(
740740

741741
let u96 = entry.append_op_result(llvm::undef(u96_type, location))?;
742742

743-
let kfalse = entry.const_int(context, location, 0, 64)?;
743+
let ktrue = entry.const_int(context, location, 1, 64)?;
744744
entry.append_operation(helper.cond_br(
745745
context,
746-
kfalse,
746+
ktrue,
747747
[0, 1],
748748
[&[guarantee], &[u96]],
749749
location,
@@ -766,7 +766,7 @@ fn build_u96_single_limb_less_than_guarantee_verify<'ctx, 'this>(
766766
) -> Result<()> {
767767
let u96_type_id = &info.branch_signatures()[0].vars[0].ty;
768768
let u96_type = registry.build_type(context, helper, metadata, u96_type_id)?;
769-
let u96 = entry.append_op_result(llvm::undef(u96_type, location))?;
769+
let u96 = entry.const_int_from_type(context, location, 0, u96_type)?;
770770

771771
entry.append_operation(helper.br(0, &[u96], location));
772772

0 commit comments

Comments
 (0)