Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEMPORARY BASE #65

Merged
merged 9 commits into from
Nov 8, 2023
1 change: 1 addition & 0 deletions circom/src/compilation_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ pub fn compile(config: CompilerConfig, program_archive: ProgramArchive, prime: &
.schedule_const_arg_deduplication_pass()
.schedule_loop_unroll_pass()
.schedule_conditional_flattening_pass()
.schedule_unused_function_removal_pass() //previous 2 passes create the dead functions
.schedule_mapped_to_indexed_pass()
.schedule_unknown_index_sanitization_pass()
.schedule_simplification_pass()
Expand Down
6 changes: 3 additions & 3 deletions circom/tests/arrays/array8.circom
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ template ArrayReturnTemplate(n) {

component main = ArrayReturnTemplate(4);

//CHECK-LABEL: define void @return_array_B_{{[0-9]+}}
//CHECK-LABEL: define{{.*}} void @return_array_B_{{[0-9]+}}
//CHECK-SAME: (i256* %[[ARENA:.*]])
//CHECK: call void @return_array_A_{{[0-9]+}}(i256* %{{.*}})
//CHECK: %[[TEMP:.*]] = getelementptr i256, i256* %{{.*}}[[ARENA]], i32 2
//CHECK: call void @fr_copy_n(i256* %{{.*}}, i256* %{{.*}}[[TEMP]], i32 5)
//CHECK: ret void
//CHECK: }

//CHECK-LABEL: define void @return_array_A_{{[0-9]+}}
//CHECK-LABEL: define{{.*}} void @return_array_A_{{[0-9]+}}
//CHECK-SAME: (i256* %[[ARENA:.*]])
//CHECK: ret void
//CHECK: }

//CHECK-LABEL: define void @ArrayReturnTemplate_{{[0-9]+}}_run
//CHECK-LABEL: define{{.*}} void @ArrayReturnTemplate_{{[0-9]+}}_run
//CHECK-SAME: ([0 x i256]* %{{.*}})
//CHECK: %lvars = alloca [6 x i256]
//CHECK: %[[TEMP:.*]] = getelementptr [6 x i256], [6 x i256]* %lvars, i32 0, i32 1
Expand Down
4 changes: 2 additions & 2 deletions circom/tests/arrays/array9.circom
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ template ArrayCopyTemplate() {

component main = ArrayCopyTemplate();

//CHECK-LABEL: define void @copy_{{[0-9]+}}
//CHECK-LABEL: define{{.*}} void @copy_{{[0-9]+}}
//CHECK-SAME: (i256* %[[ARENA:.*]])
//CHECK: %[[TEMP1:.*]] = getelementptr i256, i256* %{{.*}}[[ARENA]], i32 3
//CHECK: %[[TEMP2:.*]] = getelementptr i256, i256* %{{.*}}[[ARENA]], i32 0
//CHECK: call void @fr_copy_n(i256* %{{.*}}[[TEMP2]], i256* %{{.*}}[[TEMP1]], i32 3)
//CHECK: ret void
//CHECK: }

//CHECK-LABEL: define void @ArrayCopyTemplate_{{[0-9]+}}_run
//CHECK-LABEL: define{{.*}} void @ArrayCopyTemplate_{{[0-9]+}}_run
//CHECK-SAME: ([0 x i256]* %{{.*}})
//CHECK: %lvars = alloca [6 x i256]
//CHECK: %[[TEMP:.*]] = getelementptr [6 x i256], [6 x i256]* %lvars, i32 0, i32 3
Expand Down
2 changes: 1 addition & 1 deletion circom/tests/arrays/array_copy1.circom
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ template A(n) {

component main = A(5);

//CHECK-LABEL: define void @A_{{[0-9]+}}_run
//CHECK-LABEL: define{{.*}} void @A_{{[0-9]+}}_run
//CHECK-SAME: ([0 x i256]* %0)
//CHECK: %[[INP_PTR:[0-9]+]] = getelementptr [0 x i256], [0 x i256]* %0, i32 0, i32 0
//CHECK: %[[INP_PTR_DST:[0-9]+]] = getelementptr [0 x i256], [0 x i256]* %0, i32 0, i32 5
Expand Down
2 changes: 1 addition & 1 deletion circom/tests/arrays/array_copy2.circom
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ template A(n, S) {

component main = A(5, [11,22,33,44,55]);

//CHECK-LABEL: define void @A_{{[0-9]+}}_run
//CHECK-LABEL: define{{.*}} void @A_{{[0-9]+}}_run
//CHECK-SAME: ([0 x i256]* %0)
//CHECK: %[[INP_PTR:[0-9]+]] = getelementptr [0 x i256], [0 x i256]* %0, i32 0, i32 0
//CHECK: %[[INP_PTR_DST:[0-9]+]] = getelementptr [6 x i256], [6 x i256]* %lvars, i32 0, i32 0
Expand Down
15 changes: 11 additions & 4 deletions circom/tests/arrays/unknown_index_load_store.circom
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@ pragma circom 2.0.0;

template UnknownIndexLoadStore() {
signal input in;
signal output out[10];
signal output out[8];

var arr1[10] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var arr1[9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];
var arr2[10] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var arr3[10] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var arr3[11] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

out[in] <-- arr2[in];
}

component main = UnknownIndexLoadStore();
component main = UnknownIndexLoadStore();

// CHECK: define void @__array_store__0_to_8([0 x i256]* %0, i32 %1, i256 %2)
// CHECK: define i256 @__array_load__9_to_19([0 x i256]* %0, i32 %1)
// CHECK-NOT: @__array_load__0_to_8
// CHECK-NOT: @__array_store__9_to_19
// CHECK-NOT: @__array_load__20_to_31
// CHECK-NOT: @__array_store__20_to_31
4 changes: 2 additions & 2 deletions circom/tests/calls/call_with_array.circom
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ template CallWithArray() {

component main = CallWithArray();

//CHECK-LABEL: define void @fr_copy_n
//CHECK-LABEL: define{{.*}} void @fr_copy_n
//CHECK-SAME: (i256* %[[SRC:[0-9]+]], i256* %[[DST:[0-9]+]], i32 %[[LEN:[0-9]+]])
//CHECK: [[ENTRY_BB:.*]]:
//CHECK: %[[I:.*]] = alloca i32
Expand All @@ -40,7 +40,7 @@ component main = CallWithArray();
//CHECK-SAME: preds = %[[COND_BB]]
//CHECK: ret void

//CHECK-LABEL: define void @CallWithArray_{{[0-9]+}}_run
//CHECK-LABEL: define{{.*}} void @CallWithArray_{{[0-9]+}}_run
//CHECK-SAME: ([0 x i256]* %[[ARG:[0-9]+]])
//CHECK: call1:
//CHECK: %[[ARENA:sum_.*_arena]] = alloca [4 x i256]
Expand Down
2 changes: 1 addition & 1 deletion circom/tests/calls/call_with_array_and_scalar.circom
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ template CallWithArray() {

component main = CallWithArray();

//CHECK-LABEL: define void @CallWithArray_{{[0-9]+}}_run
//CHECK-LABEL: define{{.*}} void @CallWithArray_{{[0-9]+}}_run
//CHECK-SAME: ([0 x i256]* %[[ARG:[0-9]+]])
//CHECK: call1:
//CHECK: %[[ARENA:sum_.*_arena]] = alloca [6 x i256]
Expand Down
4 changes: 2 additions & 2 deletions circom/tests/controlflow/van348F.circom
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ template BigModOld(n) {

component main = BigModOld(2);

//CHECK-LABEL: define i256 @long_div_{{[0-9]+}}
//CHECK-LABEL: define{{.*}} i256 @long_div_{{[0-9]+}}
//CHECK-SAME: (i256* %[[ARENA:.*]])
//CHECK: %[[TEMP1:.*]] = call i256 @short_div_{{.*}}
//CHECK: %[[TEMP2:.*]] = getelementptr i256, i256* %{{.*}}[[ARENA]], i32 1
Expand All @@ -36,7 +36,7 @@ component main = BigModOld(2);
//CHECK: ret i256 %{{.*}}[[TEMP4]]
//CHECK: }

//CHECK-LABEL: define i256 @short_div_{{[0-9]+}}
//CHECK-LABEL: define{{.*}} i256 @short_div_{{[0-9]+}}
//CHECK-SAME: (i256* %[[ARENA:.*]])
//CHECK: %[[TEMP1:.*]] = call i256 @identity_{{.*}}
//CHECK: %[[TEMP2:.*]] = getelementptr i256, i256* %{{.*}}[[ARENA]], i32 1
Expand Down
2 changes: 1 addition & 1 deletion circom/tests/controlflow/van544.circom
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ template Conditional() {

component main = Conditional();

//CHECK-LABEL: define void @Conditional_{{[0-9]+}}_run
//CHECK-LABEL: define{{.*}} void @Conditional_{{[0-9]+}}_run
//CHECK-SAME: ([0 x i256]* %0)
//CHECK: %[[INP_PTR:.*]] = getelementptr [0 x i256], [0 x i256]* %0, i32 0, i32 0
//CHECK: %[[INP:.*]] = load i256, i256* %2
Expand Down
4 changes: 2 additions & 2 deletions circom/tests/debuginfo/assert.circom
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ component main = A(5);
// full lines or to remove the "--match-full-lines" option and surround each check with
// {{^}} and {{$}} but it gets messy.

//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}) !dbg !4 {
//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}){{.*}} !dbg !4 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-COUNT-06: {{.*}}, !dbg !7
//CHECK-NEXT: ret void, !dbg !7
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}) !dbg !8 {
//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}){{.*}} !dbg !8 {
//CHECK-NEXT: [[L1:prelude]]:
//CHECK-COUNT-03: {{.*}}, !dbg !9
//CHECK-EMPTY:
Expand Down
4 changes: 2 additions & 2 deletions circom/tests/debuginfo/branch.circom
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ component main = B();
// full lines or to remove the "--match-full-lines" option and surround each check with
// {{^}} and {{$}} but it gets messy.

//CHECK-LABEL: define{{.*}} void @B_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}) !dbg !4 {
//CHECK-LABEL: define{{.*}} void @B_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}){{.*}} !dbg !4 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-COUNT-06: {{.*}}, !dbg !7
//CHECK-NEXT: ret void, !dbg !7
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @B_0_run([0 x i256]* %{{[[:alnum:]_]+}}) !dbg !8 {
//CHECK-LABEL: define{{.*}} void @B_0_run([0 x i256]* %{{[[:alnum:]_]+}}){{.*}} !dbg !8 {
//CHECK-NEXT: [[L1:prelude]]:
//CHECK-COUNT-03: {{.*}}, !dbg !9
//CHECK-EMPTY:
Expand Down
6 changes: 3 additions & 3 deletions circom/tests/debuginfo/call_and_return.circom
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ component main = C();
// full lines or to remove the "--match-full-lines" option and surround each check with
// {{^}} and {{$}} but it gets messy.

//CHECK-LABEL: define{{.*}} i256 @negative_0(i256* %{{[[:alnum:]_]+}}) !dbg !4 {
//CHECK-LABEL: define{{.*}} i256 @negative_0(i256* %{{[[:alnum:]_]+}}){{.*}} !dbg !4 {
//CHECK-NEXT: [[L1:[[:alnum:]_]+]]:
//CHECK-COUNT-01: {{.*}}, !dbg !7
//CHECK-EMPTY:
Expand All @@ -42,13 +42,13 @@ component main = C();
//CHECK-NEXT: unreachable, !dbg !10
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @C_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}) !dbg !11 {
//CHECK-LABEL: define{{.*}} void @C_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}){{.*}} !dbg !11 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-COUNT-06: {{.*}}, !dbg !12
//CHECK-NEXT: ret void, !dbg !12
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @C_0_run([0 x i256]* %{{[[:alnum:]_]+}}) !dbg !13 {
//CHECK-LABEL: define{{.*}} void @C_0_run([0 x i256]* %{{[[:alnum:]_]+}}){{.*}} !dbg !13 {
//CHECK-NEXT: [[L1:prelude]]:
//CHECK-COUNT-03: {{.*}}, !dbg !14
//CHECK-EMPTY:
Expand Down
4 changes: 2 additions & 2 deletions circom/tests/debuginfo/compute.circom
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ component main = A(1);
// full lines or to remove the "--match-full-lines" option and surround each check with
// {{^}} and {{$}} but it gets messy.

//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}) !dbg !4 {
//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}){{.*}} !dbg !4 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-COUNT-06: {{.*}}, !dbg !7
//CHECK-NEXT: ret void, !dbg !7
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}) !dbg !8 {
//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}){{.*}} !dbg !8 {
//CHECK-NEXT: [[L01:prelude]]:
//CHECK-COUNT-03: {{.*}}, !dbg !9
//CHECK-EMPTY:
Expand Down
4 changes: 2 additions & 2 deletions circom/tests/debuginfo/constraint.circom
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ component main = A();
// full lines or to remove the "--match-full-lines" option and surround each check with
// {{^}} and {{$}} but it gets messy.

//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}) !dbg !4 {
//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}){{.*}} !dbg !4 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-COUNT-06: {{.*}}, !dbg !7
//CHECK-NEXT: ret void, !dbg !7
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}) !dbg !8 {
//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}){{.*}} !dbg !8 {
//CHECK-NEXT: [[L1:prelude]]:
//CHECK-COUNT-03: {{.*}}, !dbg !9
//CHECK-EMPTY:
Expand Down
8 changes: 4 additions & 4 deletions circom/tests/debuginfo/create_component.circom
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ component main = A(5);
// full lines or to remove the "--match-full-lines" option and surround each check with
// {{^}} and {{$}} but it gets messy.

//CHECK-LABEL: define{{.*}} void @B_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}) !dbg !4 {
//CHECK-LABEL: define{{.*}} void @B_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}){{.*}} !dbg !4 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-COUNT-06: {{.*}}, !dbg !7
//CHECK-NEXT: ret void, !dbg !7
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @B_0_run([0 x i256]* %{{[[:alnum:]_]+}}) !dbg !8 {
//CHECK-LABEL: define{{.*}} void @B_0_run([0 x i256]* %{{[[:alnum:]_]+}}){{.*}} !dbg !8 {
//CHECK-NEXT: [[L1:prelude]]:
//CHECK-COUNT-03: {{.*}}, !dbg !9
//CHECK-EMPTY:
Expand All @@ -38,13 +38,13 @@ component main = A(5);
//CHECK-NEXT: ret void, !dbg !9
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @A_1_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}) !dbg !10 {
//CHECK-LABEL: define{{.*}} void @A_1_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}){{.*}} !dbg !10 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-COUNT-06: {{.*}}, !dbg !11
//CHECK-NEXT: ret void, !dbg !11
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @A_1_run([0 x i256]* %{{[[:alnum:]_]+}}) !dbg !12 {
//CHECK-LABEL: define{{.*}} void @A_1_run([0 x i256]* %{{[[:alnum:]_]+}}){{.*}} !dbg !12 {
//CHECK-NEXT: [[L1:prelude]]:
//CHECK-COUNT-03: {{.*}}, !dbg !13
//CHECK-EMPTY:
Expand Down
4 changes: 2 additions & 2 deletions circom/tests/debuginfo/load.circom
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ component main = A(1);
// full lines or to remove the "--match-full-lines" option and surround each check with
// {{^}} and {{$}} but it gets messy.

//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}) !dbg !4 {
//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}){{.*}} !dbg !4 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-COUNT-06: {{.*}}, !dbg !7
//CHECK-NEXT: ret void, !dbg !7
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}) !dbg !8 {
//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}){{.*}} !dbg !8 {
//CHECK-NEXT: [[L1:prelude]]:
//CHECK-COUNT-03: {{.*}}, !dbg !9
//CHECK-EMPTY:
Expand Down
4 changes: 2 additions & 2 deletions circom/tests/debuginfo/log.circom
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ component main = A();
// full lines or to remove the "--match-full-lines" option and surround each check with
// {{^}} and {{$}} but it gets messy.

//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}) !dbg !4 {
//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}){{.*}} !dbg !4 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-COUNT-05: {{.*}}, !dbg !7
//CHECK-NEXT: ret void, !dbg !7
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}) !dbg !8 {
//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}){{.*}} !dbg !8 {
//CHECK-NEXT: [[L1:prelude]]:
//CHECK-COUNT-03: {{.*}}, !dbg !9
//CHECK-EMPTY:
Expand Down
57 changes: 36 additions & 21 deletions circom/tests/debuginfo/loop_and_block.circom
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,57 @@ component main = A(3);
// full lines or to remove the "--match-full-lines" option and surround each check with
// {{^}} and {{$}} but it gets messy.

//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}) !dbg !4 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-LABEL: define{{.*}} void @..generated..loop.body.{{[0-9]+}}([0 x i256]* %lvars, [0 x i256]* %signals, i256* %fix_{{[0-9]+}}, i256* %fix_{{[0-9]+}}){{.*}} !dbg !4 {
//CHECK-NEXT: [[$F_ID_1:..generated..loop.body.[0-9]+]]:
//CHECK-COUNT-01: {{.*}}, !dbg !7
//CHECK-EMPTY:
//CHECK-NEXT: [[L01:store[0-9]*]]:{{[[:space:]]}}; preds = %[[$F_ID_1]]
//CHECK-COUNT-05: {{.*}}, !dbg !8
//CHECK-EMPTY:
//CHECK-NEXT: [[L02:store[0-9]*]]:{{[[:space:]]}}; preds = %[[L01]]
//CHECK-COUNT-06: {{.*}}, !dbg !7
//CHECK-EMPTY:
//CHECK-NEXT: return{{[0-9]*}}:{{[[:space:]]}}; preds = %[[L02]]
//CHECK-NEXT: ret void, !dbg !7
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}) !dbg !8 {
//CHECK-LABEL: define{{.*}} void @A_0_build({ [0 x i256]*, i32 }* %{{[[:alnum:]_]+}}){{.*}} !dbg !9 {
//CHECK-NEXT: [[L1:main]]:
//CHECK-COUNT-06: {{.*}}, !dbg !10
//CHECK-NEXT: ret void, !dbg !10
//CHECK-NEXT: }

//CHECK-LABEL: define{{.*}} void @A_0_run([0 x i256]* %{{[[:alnum:]_]+}}){{.*}} !dbg !11 {
//CHECK-NEXT: [[L01:prelude]]:
//CHECK-COUNT-03: {{.*}}, !dbg !9
//CHECK-COUNT-03: {{.*}}, !dbg !12
//CHECK-EMPTY:
//CHECK-NEXT: [[L02:store[0-9]*]]:{{[[:space:]]}}; preds = %[[L01]]
//CHECK-COUNT-03: {{.*}}, !dbg !9
//CHECK-COUNT-03: {{.*}}, !dbg !12
//CHECK-EMPTY:
//CHECK-NEXT: [[L03:store[0-9]*]]:{{[[:space:]]}}; preds = %[[L02]]
//CHECK-COUNT-03: {{.*}}, !dbg !10
//CHECK-COUNT-03: {{.*}}, !dbg !13
//CHECK-EMPTY:
//CHECK-NEXT: [[L04:unrolled_loop[0-9]*]]:{{[[:space:]]}}; preds = %[[L03]]
//CHECK-COUNT-04: {{.*}}, !dbg !11
//CHECK-COUNT-02: {{.*}}, !dbg !10
//CHECK-COUNT-04: {{.*}}, !dbg !11
//CHECK-COUNT-02: {{.*}}, !dbg !10
//CHECK-COUNT-04: {{.*}}, !dbg !11
//CHECK-COUNT-02: {{.*}}, !dbg !10
//CHECK-NEXT: br label %prologue, !dbg !10
//CHECK-COUNT-03: {{.*}}, !dbg !13
//CHECK-NEXT: call void @[[$F_ID_1]]([0 x i256]* %{{[[:alnum:]_]+}}, [0 x i256]* %{{[[:alnum:]_]+}}, i256* %{{[[:alnum:]_]+}}, i256* %{{[[:alnum:]_]+}}), !dbg !13
//CHECK-COUNT-03: {{.*}}, !dbg !13
//CHECK-NEXT: call void @[[$F_ID_1]]([0 x i256]* %{{[[:alnum:]_]+}}, [0 x i256]* %{{[[:alnum:]_]+}}, i256* %{{[[:alnum:]_]+}}, i256* %{{[[:alnum:]_]+}}), !dbg !13
//CHECK-COUNT-03: {{.*}}, !dbg !13
//CHECK-NEXT: call void @[[$F_ID_1]]([0 x i256]* %{{[[:alnum:]_]+}}, [0 x i256]* %{{[[:alnum:]_]+}}, i256* %{{[[:alnum:]_]+}}, i256* %{{[[:alnum:]_]+}}), !dbg !13
//CHECK-NEXT: br label %prologue, !dbg !13
//CHECK-EMPTY:
//CHECK-NEXT: [[L05:prologue]]:{{[[:space:]]}}; preds = %[[L04]]
//CHECK-NEXT: ret void, !dbg !10
//CHECK-NEXT: ret void, !dbg !13
//CHECK-NEXT: }

//CHECK-LABEL: !llvm.dbg.cu = !{!1}
//CHECK: !1 = distinct !DICompileUnit({{.*}}file: !2{{.*}})
//CHECK: !2 = !DIFile(filename:{{.*}}loop_and_block.circom{{.*}})
//CHECK: !4 = distinct !DISubprogram(name: "A", linkageName: "A_0_build", scope: null, file: !2, line: 5, {{.*}}unit: !1{{.*}})
//CHECK: !7 = !DILocation(line: 5, scope: !4)
//CHECK: !8 = distinct !DISubprogram(name: "A", linkageName: "A_0_run", scope: null, file: !2, line: 5, {{.*}}unit: !1{{.*}})
//CHECK: !9 = !DILocation(line: 5, scope: !8)
//CHECK: !10 = !DILocation(line: 9, scope: !8)
//CHECK: !11 = !DILocation(line: 10, scope: !8)

//CHECK: !4 = distinct !DISubprogram(name: "[[$F_ID_1]]", linkageName: "[[$F_ID_1]]", scope: null, file: !2, line: 9, {{.*}}unit: !1{{.*}})
//CHECK: !7 = !DILocation(line: 9, scope: !4)
//CHECK: !8 = !DILocation(line: 10, scope: !4)
//CHECK: !9 = distinct !DISubprogram(name: "A", linkageName: "A_0_build", scope: null, file: !2, line: 5, {{.*}}unit: !1{{.*}})
//CHECK: !10 = !DILocation(line: 5, scope: !9)
//CHECK: !11 = distinct !DISubprogram(name: "A", linkageName: "A_0_run", scope: null, file: !2, line: 5, {{.*}}unit: !1{{.*}})
//CHECK: !12 = !DILocation(line: 5, scope: !11)
//CHECK: !13 = !DILocation(line: 9, scope: !11)
Loading
Loading