Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions compiler/noirc_evaluator/src/ssa/opt/flatten_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ impl Ssa {

for function in self.functions.values_mut() {
// Disabled due to failures
// #[cfg(debug_assertions)]
// flatten_cfg_pre_check(function);
#[cfg(debug_assertions)]
flatten_cfg_pre_check(function);

flatten_function_cfg(function, &no_predicates);

// Disabled as we're getting failures, I would expect this to pass however.
// #[cfg(debug_assertions)]
// flatten_cfg_post_check(function);
#[cfg(debug_assertions)]
flatten_cfg_post_check(function);
}
self
}
Expand Down Expand Up @@ -1634,8 +1634,8 @@ mod test {
// The original function is replaced by the following:
let src = "
acir(inline) fn main f1 {
b0():
jmpif u1 0 then: b1, else: b2
b0(v0: u1):
jmpif v0 then: b1, else: b2
b1():
jmp b2()
b2():
Expand All @@ -1648,7 +1648,9 @@ mod test {
let ssa = ssa.flatten_cfg();
assert_ssa_snapshot!(ssa, @r"
acir(inline) fn main f0 {
b0():
b0(v0: u1):
enable_side_effects v0
v1 = not v0
enable_side_effects u1 1
constrain u1 0 == u1 1
return
Expand Down
Loading