Skip to content

Commit

Permalink
fix expected to be normalized
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm committed Dec 12, 2024
1 parent 456aabe commit 1777215
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions compiler/noirc_evaluator/src/ssa/opt/loop_invariant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ mod test {
v25 = add v2, u32 1
jmp b1(v25)
}
brillig(inline) fn foo f1 {
b0(v0: [Field; 5]):
return
Expand All @@ -642,30 +641,29 @@ mod test {
let expected = "
brillig(inline) fn main f0 {
b0(v0: u32, v1: u32):
v32 = make_array [Field 1, Field 2, Field 3, Field 4, Field 5] : [Field; 5]
v33 = allocate -> &mut [Field; 5]
v34 = array_set v32, index v0, value Field 64
v35 = add v0, u32 1
store v34 at v33
v36 = make_array [Field 1, Field 2, Field 3, Field 4, Field 5] : [Field; 5]
v8 = make_array [Field 1, Field 2, Field 3, Field 4, Field 5] : [Field; 5]
v9 = allocate -> &mut [Field; 5]
v11 = array_set v8, index v0, value Field 64
v13 = add v0, u32 1
store v11 at v9
v14 = make_array [Field 1, Field 2, Field 3, Field 4, Field 5] : [Field; 5]
jmp b1(u32 0)
b1(v2: u32):
v37 = lt v2, u32 5
jmpif v37 then: b3, else: b2
v17 = lt v2, u32 5
jmpif v17 then: b3, else: b2
b2():
v38 = load v33 -> [Field; 5]
call f1(v38)
v18 = load v9 -> [Field; 5]
call f1(v18)
return
b3():
inc_rc v36
v39 = allocate -> &mut [Field; 5]
v40 = add v1, v2
v41 = array_set v36, index v40, value Field 128
call f1(v41)
v42 = add v2, u32 1
jmp b1(v42)
inc_rc v14
v20 = allocate -> &mut [Field; 5]
v21 = add v1, v2
v23 = array_set v14, index v21, value Field 128
call f1(v23)
v25 = add v2, u32 1
jmp b1(v25)
}
brillig(inline) fn foo f1 {
b0(v0: [Field; 5]):
return
Expand Down

0 comments on commit 1777215

Please sign in to comment.