Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion compiler/noirc_evaluator/src/ssa/opt/die.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ fn can_be_eliminated_if_unused(
false
}
} else {
true
// Checked binary operations can have different behavior depending on the predicate.
!instruction.requires_acir_gen_predicate(&function.dfg)
}
}

Expand Down
1 change: 0 additions & 1 deletion test_programs/execution_failure/regression_7759/stdout.txt

This file was deleted.

6 changes: 6 additions & 0 deletions test_programs/execution_failure/regression_8230/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "regression_8230"
type = "bin"
authors = [""]

[dependencies]
Empty file.
20 changes: 20 additions & 0 deletions test_programs/execution_failure/regression_8230/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
global G_A: u16 = 63895;
fn main() -> return_data Field {
{
let mut a = G_A;
a = {
for idx_e in 28603..28607 {
a = a + G_A;
let _f = (
(idx_e as Field), if (!if true { true } else { true }) {
""
} else {
""
},
);
}
G_A
};
-239954134027687318469209338074081854550
}
}
6 changes: 6 additions & 0 deletions test_programs/execution_failure/regression_8231/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "regression_8231"
type = "bin"
authors = [""]

[dependencies]
Empty file.
36 changes: 36 additions & 0 deletions test_programs/execution_failure/regression_8231/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
fn main() -> return_data u64 {
let a = func_1(
14689037232568219155,
[
if func_1(17646232386218405628, [false], [false]).1[0] {
func_1(11451277504337646047, [false], [false]).1[0]
} else {
func_1(11704721419935139919, [false], [false]).1[0]
},
],
func_1(3992567483480081404, [false], [false]).1,
)
.1[0];
if a {
10065726339818009114
} else {
3961249039905748235
}
}
fn func_1(mut a: u64, mut b: [bool; 1], mut c: [bool; 1]) -> (i64, [bool; 1]) {
(
8121234367547610657,
if (
if b[0] {
((13114411833230085298 - 6125002935022187089) as u128)
} else {
303382553271271725227074853195150626951
}
> ((a + a) as u128)
) {
b
} else {
c
},
)
}
6 changes: 6 additions & 0 deletions test_programs/execution_failure/regression_8233/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "regression_8233"
type = "bin"
authors = [""]

[dependencies]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c = true
27 changes: 27 additions & 0 deletions test_programs/execution_failure/regression_8233/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
global G_A: u128 = 34475917616803563277280217276819298828;
fn main(c: bool) -> pub u32 {
let mut d: [Field; 1] = func_3(779302847);
d = if c {
d[0] = (G_A as Field);
d
} else { d };
1948156509
}

fn func_3(b: u32) -> [Field; 1] {
[
if true {
if (if (!false) { 1061432097 } else { (b >> 41) } < (506440519 - 3531841762)) {
if true {
((G_A as Field) - (297742546099112882246414176413370796930 + (b as Field)))
} else {
(G_A as Field)
}
} else {
(G_A as Field)
}
} else {
(b as Field)
},
]
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading