Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Dec 18, 2024
1 parent 9ae5af7 commit b46bafb
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions compiler/noirc_evaluator/src/ssa/opt/loop_invariant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,19 +386,19 @@ mod test {
// hoist `v7 = mul v6, v0`.
let src = "
brillig(inline) fn main f0 {
b0(v0: u32, v1: u32):
jmp b1(u32 0)
b1(v2: u32):
v5 = lt v2, u32 4
b0(v0: i32, v1: i32):
jmp b1(i32 0)
b1(v2: i32):
v5 = lt v2, i32 4
jmpif v5 then: b3, else: b2
b2():
return
b3():
v6 = mul v0, v1
v7 = mul v6, v0
v8 = eq v7, u32 12
constrain v7 == u32 12
v9 = add v2, u32 1
v8 = eq v7, i32 12
constrain v7 == i32 12
v9 = add v2, i32 1
jmp b1(v9)
}
";
Expand All @@ -411,19 +411,19 @@ mod test {

let expected = "
brillig(inline) fn main f0 {
b0(v0: u32, v1: u32):
b0(v0: i32, v1: i32):
v3 = mul v0, v1
v4 = mul v3, v0
v6 = eq v4, u32 12
jmp b1(u32 0)
b1(v2: u32):
v9 = lt v2, u32 4
v6 = eq v4, i32 12
jmp b1(i32 0)
b1(v2: i32):
v9 = lt v2, i32 4
jmpif v9 then: b3, else: b2
b2():
return
b3():
constrain v4 == u32 12
v11 = add v2, u32 1
constrain v4 == i32 12
v11 = add v2, i32 1
jmp b1(v11)
}
";
Expand Down

0 comments on commit b46bafb

Please sign in to comment.