From c180335ed0aacafa829a391bbcafe350de070d7f Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Tue, 10 Jun 2025 15:12:54 +0000 Subject: [PATCH 01/10] fix signed cast simplification --- .../src/ssa/ir/dfg/simplify/cast.rs | 64 +++++++++++++++++-- .../regression_8305/Nargo.toml | 6 ++ .../regression_8305/Prover.toml | 1 + .../regression_8305/src/main.nr | 9 +++ .../execute__tests__expanded.snap | 13 ++++ .../execute__tests__stdout.snap | 5 ++ 6 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 test_programs/execution_success/regression_8305/Nargo.toml create mode 100644 test_programs/execution_success/regression_8305/Prover.toml create mode 100644 test_programs/execution_success/regression_8305/src/main.nr create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__expanded.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__stdout.snap diff --git a/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs b/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs index 42a3532d336..e685b923ec3 100644 --- a/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs +++ b/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs @@ -4,6 +4,7 @@ use num_bigint::BigUint; use crate::ssa::ir::{ dfg::{DataFlowGraph, simplify::SimplifyResult}, instruction::Instruction, + integer::IntegerConstant, types::{NumericType, Type}, value::{Value, ValueId}, }; @@ -54,13 +55,13 @@ pub(super) fn simplify_cast( NumericType::NativeField | NumericType::Unsigned { .. } | NumericType::Signed { .. }, - NumericType::Signed { bit_size }, + NumericType::Signed { .. }, ) => { // Field/Unsigned -> signed - // We only simplify to signed when we are below the maximum signed integer of the destination type. - let integer_modulus = BigUint::from(2u128).pow(bit_size - 1); - let constant_uint: BigUint = BigUint::from_bytes_be(&constant.to_be_bytes()); - if constant_uint < integer_modulus { + // We could only simplify to signed when we are below the maximum integer of the destination type. + // However, we expect that overflow constraints have been generated appropriately that enforce correctness. + let integer_constant = IntegerConstant::from_numeric_constant(constant, dst_typ); + if integer_constant.is_some() { SimplifiedTo(dfg.make_constant(constant, dst_typ)) } else { None @@ -73,3 +74,56 @@ pub(super) fn simplify_cast( None } } + +#[cfg(test)] +mod tests { + use crate::{assert_ssa_snapshot, ssa::ssa_gen::Ssa}; + + #[test] + fn unsigned_u8_to_i8_safe() { + let src = " + brillig(inline) predicate_pure fn main f0 { + b0(): + v2 = cast u8 135 as i8 + v3 = truncate v2 to 8 bits, max_bit_size: 9 + v4 = cast v3 as u8 + v6 = lt v4, u8 128 + constrain v6 == u1 0 + return v3 + } + "; + let ssa = Ssa::from_str_simplifying(src).unwrap(); + + assert_ssa_snapshot!(ssa, @r" + brillig(inline) predicate_pure fn main f0 { + b0(): + return i8 135 + } + "); + } + + #[test] + fn unsigned_u8_to_i8_out_of_bounds() { + let src = " + brillig(inline) predicate_pure fn main f0 { + b0(): + v2 = cast u8 300 as i8 + v3 = truncate v2 to 8 bits, max_bit_size: 9 + v4 = cast v3 as u8 + v6 = lt v4, u8 128 + constrain v6 == u1 0 + return v3 + } + "; + let ssa = Ssa::from_str_simplifying(src).unwrap(); + + // The overflow check would fail here. + assert_ssa_snapshot!(ssa, @r" + brillig(inline) predicate_pure fn main f0 { + b0(): + constrain u1 1 == u1 0 + return i8 44 + } + "); + } +} diff --git a/test_programs/execution_success/regression_8305/Nargo.toml b/test_programs/execution_success/regression_8305/Nargo.toml new file mode 100644 index 00000000000..f0feb35dffa --- /dev/null +++ b/test_programs/execution_success/regression_8305/Nargo.toml @@ -0,0 +1,6 @@ +[package] +name = "regression_8305" +type = "bin" +authors = [""] + +[dependencies] \ No newline at end of file diff --git a/test_programs/execution_success/regression_8305/Prover.toml b/test_programs/execution_success/regression_8305/Prover.toml new file mode 100644 index 00000000000..21eded967a3 --- /dev/null +++ b/test_programs/execution_success/regression_8305/Prover.toml @@ -0,0 +1 @@ +a = -2 diff --git a/test_programs/execution_success/regression_8305/src/main.nr b/test_programs/execution_success/regression_8305/src/main.nr new file mode 100644 index 00000000000..545a6a0307a --- /dev/null +++ b/test_programs/execution_success/regression_8305/src/main.nr @@ -0,0 +1,9 @@ +fn main(a: i32) -> pub i32 { + let mut r: i32 = 0; + let s: i32 = -2; + let e: i32 = -1; + for _ in (s - 0)..(e + 0) { + r = r + a; + } + r +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__expanded.snap new file mode 100644 index 00000000000..f4a0d225f96 --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__expanded.snap @@ -0,0 +1,13 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: expanded_code +--- +fn main(a: i32) -> pub i32 { + let mut r: i32 = 0; + let s: i32 = -2; + let e: i32 = -1; + for _ in s - 0..e + 0 { + r = r + a; + } + r +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__stdout.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__stdout.snap new file mode 100644 index 00000000000..2aaf76053e0 --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__stdout.snap @@ -0,0 +1,5 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: stdout +--- +[regression_8305] Circuit output: Field(4294967294) From bc525386ff951ce69e92325db0481b9307f11d2e Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Tue, 10 Jun 2025 15:16:43 +0000 Subject: [PATCH 02/10] snaps --- ...sts__force_brillig_false_inliner_-9223372036854775808.snap | 2 +- .../execute__tests__force_brillig_false_inliner_0.snap | 2 +- ...ests__force_brillig_false_inliner_9223372036854775807.snap | 2 +- ...ests__force_brillig_true_inliner_-9223372036854775808.snap | 4 ++-- .../execute__tests__force_brillig_true_inliner_0.snap | 4 ++-- ...tests__force_brillig_true_inliner_9223372036854775807.snap | 4 ++-- ...sts__force_brillig_false_inliner_-9223372036854775808.snap | 2 +- .../execute__tests__force_brillig_false_inliner_0.snap | 2 +- ...ests__force_brillig_false_inliner_9223372036854775807.snap | 2 +- ...ests__force_brillig_true_inliner_-9223372036854775808.snap | 4 ++-- .../execute__tests__force_brillig_true_inliner_0.snap | 4 ++-- ...tests__force_brillig_true_inliner_9223372036854775807.snap | 4 ++-- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap index d33c826277e..b8e0562db07 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap @@ -246,7 +246,7 @@ expression: artifact "unconstrained func 1", "[Const { destination: Direct(21), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(20), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(21), offset_address: Direct(20) }, Const { destination: Direct(2), bit_size: Field, value: 0 }, BinaryFieldOp { destination: Direct(3), op: Equals, lhs: Direct(0), rhs: Direct(2) }, JumpIf { condition: Direct(3), location: 8 }, Const { destination: Direct(1), bit_size: Field, value: 1 }, BinaryFieldOp { destination: Direct(0), op: Div, lhs: Direct(1), rhs: Direct(0) }, Stop { return_data: HeapVector { pointer: Direct(20), size: Direct(21) } }]" ], - "debug_symbols": "pZbBTuMwFEX/Jesu8t7zsx1+ZTRCoQRUKWqr0CKNEP8+tm8uA4vZJJuc04Z3Wlo7zUf3PD3dXx9P55fLW/fw66N7Wk7zfHp9nC/H8Xa6nMuzH5+Hjg8fb8s0lae6b+fL1HVcpvOtezjf5/nQvY/zvf3R23U8N97GpZztD910fi4swZfTPFX7PPyb7v8/KprXYTH7GvdN88OW+Rg4H+OGee3jOq8iO+fTlvlknE9533wOG+ZNZZ033fL9mfH1zXzLfOLnZ1l2zm/5/ILw/QfZ8v6DO+djv3N+y/r1r/XnYjvnt+w///r+3fK++aA753++/u/yaDyelh9XzM7KheLQhXb0doztmNoxt+PQjtIDAiiAeUFAUBAkBA1BRFBRVBQVRUVRUVQUFUVFS0ULSqX8Zzo0WA8IoIABAXAgAqVSLoyWgaEh9IAAChgQAAcigEpAJaDiqDgqjoqXSlnIXiplPbkDEUhABoaG2AMCKGAAKhGViEpEJaISUUmoJFQSKgmVVCqpoFTKT0yKQAIyMDTkHhBAAQNKZShwIAIJyMDQMPSAAArUb7os3yGs9JVxZVqZVw6g9D1FKEoxSqA4JVISJVNqua3nWtYqQlGKUQLFKZGSKJlSy1a3SE8RilKMEihOiZREyRSWjWVj2Vg2lus+kFClllOVSEmUTBlWqXsCIhSlGCVQWA4sB5YDy4FlZ9lZdpadZWfZWXaWnWVn2VmOLEeWI8uR5bqHJFdxSqQkSqYMq9T9BBGKUozCcmI5sZxYTiwnljPLmeXMct1p7bfnfVxO49M8rbe2L/fz8dud7u3PlWd4L3xdLsfp+b5M9RrfzpWr/l8=", + "debug_symbols": "pZbBTuMwFEX/Jesu8vz8nh1+ZTRCoQRUKUqr0CKNEP8+tm8uA4vZpBuf04Z3WtI4ykf3PD3dXh9Py8v5rXv49dE9rad5Pr0+zufjeD2dl/Lux+eh48vH6zpN5a3u2/EydRnXabl2D8ttng/d+zjf2h+9Xcal8Tqu5Wh/6KblubAEX07zVO3z8G+6//+ohLwNi+rXuO2aH/bMe+S8+4750Ps2H0TunE975pNyPuX75nPcMa9BtnkNe34/VX6+qu2ZTzx/muXO+T3nLwq/f5Q93z+acd77O+f3XL/2df5N833zMdw5//Pzf5dX4/G0/rhjdVo26qGLbbW2eltTW3Nbh7ZKDwgQAMwLAoKCICFoCCKCSkAloBJQCagEVAIqAZVQKqGgVMp/FoYG7QEBAqBABAxwoFTKjUkzMDTEHhAgAApEwAAHUImoRFQMFUPFULFSKReSlUrZD2aAAwnIwNDgPSBAABRAxVFxVBwVR8VRSagkVBIqCZVUKqmgVMotPjmQgAwMDbkHBAiAAqUyFBjgQAIyMDQMPSBAAOovXS7fIW60jb4xbcwbB1D6niKUQFFKpBjFKYmSKbXcrudaDlWEEihKiRSjOCVRMqWWtW6RniKUQFFKpBjFKYmSKSwry8qysqws130gsUotWxWnJEqmDJvUPQERSqAoJVJYjixHliPLkWVj2Vg2lo1lY9lYNpaNZWPZWHaWnWVn2Vmue0i8ilGckiiZMmxS9xNEKIGiFJYTy4nlxHJiObGcWc4sZ5brTmvPLu/jehqf5ml7tHy5LcdvT5rXPxce4bPoZT0fp+fbOtV7fDtW7vp/AQ==", "file_map": { "50": { "source": "fn main(mut x: i32, mut y: i32, z: i32) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(s1 + s2 == 13);\n assert(x + y == 13);\n\n s2 = -8;\n y = -y;\n assert(s1 + s2 == -3);\n assert(x + y == -3);\n\n s1 = -15;\n assert(s1 - s2 == -7);\n assert(z - y == -7);\n\n s1 = -5;\n s2 = 8;\n x = -x;\n y = -y;\n assert(s1 - s2 == -13);\n assert(x - y == -13);\n\n s2 = -8;\n y = -y;\n assert(s1 * s2 == 40);\n assert(x * y == 40);\n\n s1 = 1;\n s2 = -8;\n assert(s1 * s2 == -8);\n assert(x / x * y == -8);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_0.snap index d33c826277e..b8e0562db07 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_0.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_0.snap @@ -246,7 +246,7 @@ expression: artifact "unconstrained func 1", "[Const { destination: Direct(21), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(20), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(21), offset_address: Direct(20) }, Const { destination: Direct(2), bit_size: Field, value: 0 }, BinaryFieldOp { destination: Direct(3), op: Equals, lhs: Direct(0), rhs: Direct(2) }, JumpIf { condition: Direct(3), location: 8 }, Const { destination: Direct(1), bit_size: Field, value: 1 }, BinaryFieldOp { destination: Direct(0), op: Div, lhs: Direct(1), rhs: Direct(0) }, Stop { return_data: HeapVector { pointer: Direct(20), size: Direct(21) } }]" ], - "debug_symbols": "pZbBTuMwFEX/Jesu8t7zsx1+ZTRCoQRUKWqr0CKNEP8+tm8uA4vZJJuc04Z3Wlo7zUf3PD3dXx9P55fLW/fw66N7Wk7zfHp9nC/H8Xa6nMuzH5+Hjg8fb8s0lae6b+fL1HVcpvOtezjf5/nQvY/zvf3R23U8N97GpZztD910fi4swZfTPFX7PPyb7v8/KprXYTH7GvdN88OW+Rg4H+OGee3jOq8iO+fTlvlknE9533wOG+ZNZZ033fL9mfH1zXzLfOLnZ1l2zm/5/ILw/QfZ8v6DO+djv3N+y/r1r/XnYjvnt+w///r+3fK++aA753++/u/yaDyelh9XzM7KheLQhXb0doztmNoxt+PQjtIDAiiAeUFAUBAkBA1BRFBRVBQVRUVRUVQUFUVFS0ULSqX8Zzo0WA8IoIABAXAgAqVSLoyWgaEh9IAAChgQAAcigEpAJaDiqDgqjoqXSlnIXiplPbkDEUhABoaG2AMCKGAAKhGViEpEJaISUUmoJFQSKgmVVCqpoFTKT0yKQAIyMDTkHhBAAQNKZShwIAIJyMDQMPSAAArUb7os3yGs9JVxZVqZVw6g9D1FKEoxSqA4JVISJVNqua3nWtYqQlGKUQLFKZGSKJlSy1a3SE8RilKMEihOiZREyRSWjWVj2Vg2lus+kFClllOVSEmUTBlWqXsCIhSlGCVQWA4sB5YDy4FlZ9lZdpadZWfZWXaWnWVn2VmOLEeWI8uR5bqHJFdxSqQkSqYMq9T9BBGKUozCcmI5sZxYTiwnljPLmeXMct1p7bfnfVxO49M8rbe2L/fz8dud7u3PlWd4L3xdLsfp+b5M9RrfzpWr/l8=", + "debug_symbols": "pZbBTuMwFEX/Jesu8vz8nh1+ZTRCoQRUKUqr0CKNEP8+tm8uA4vZpBuf04Z3WtI4ykf3PD3dXh9Py8v5rXv49dE9rad5Pr0+zufjeD2dl/Lux+eh48vH6zpN5a3u2/EydRnXabl2D8ttng/d+zjf2h+9Xcal8Tqu5Wh/6KblubAEX07zVO3z8G+6//+ohLwNi+rXuO2aH/bMe+S8+4750Ps2H0TunE975pNyPuX75nPcMa9BtnkNe34/VX6+qu2ZTzx/muXO+T3nLwq/f5Q93z+acd77O+f3XL/2df5N833zMdw5//Pzf5dX4/G0/rhjdVo26qGLbbW2eltTW3Nbh7ZKDwgQAMwLAoKCICFoCCKCSkAloBJQCagEVAIqAZVQKqGgVMp/FoYG7QEBAqBABAxwoFTKjUkzMDTEHhAgAApEwAAHUImoRFQMFUPFULFSKReSlUrZD2aAAwnIwNDgPSBAABRAxVFxVBwVR8VRSagkVBIqCZVUKqmgVMotPjmQgAwMDbkHBAiAAqUyFBjgQAIyMDQMPSBAAOovXS7fIW60jb4xbcwbB1D6niKUQFFKpBjFKYmSKbXcrudaDlWEEihKiRSjOCVRMqWWtW6RniKUQFFKpBjFKYmSKSwry8qysqws130gsUotWxWnJEqmDJvUPQERSqAoJVJYjixHliPLkWVj2Vg2lo1lY9lYNpaNZWPZWHaWnWVn2Vmue0i8ilGckiiZMmxS9xNEKIGiFJYTy4nlxHJiObGcWc4sZ5brTmvPLu/jehqf5ml7tHy5LcdvT5rXPxce4bPoZT0fp+fbOtV7fDtW7vp/AQ==", "file_map": { "50": { "source": "fn main(mut x: i32, mut y: i32, z: i32) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(s1 + s2 == 13);\n assert(x + y == 13);\n\n s2 = -8;\n y = -y;\n assert(s1 + s2 == -3);\n assert(x + y == -3);\n\n s1 = -15;\n assert(s1 - s2 == -7);\n assert(z - y == -7);\n\n s1 = -5;\n s2 = 8;\n x = -x;\n y = -y;\n assert(s1 - s2 == -13);\n assert(x - y == -13);\n\n s2 = -8;\n y = -y;\n assert(s1 * s2 == 40);\n assert(x * y == 40);\n\n s1 = 1;\n s2 = -8;\n assert(s1 * s2 == -8);\n assert(x / x * y == -8);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_9223372036854775807.snap index d33c826277e..b8e0562db07 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_9223372036854775807.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_false_inliner_9223372036854775807.snap @@ -246,7 +246,7 @@ expression: artifact "unconstrained func 1", "[Const { destination: Direct(21), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(20), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(21), offset_address: Direct(20) }, Const { destination: Direct(2), bit_size: Field, value: 0 }, BinaryFieldOp { destination: Direct(3), op: Equals, lhs: Direct(0), rhs: Direct(2) }, JumpIf { condition: Direct(3), location: 8 }, Const { destination: Direct(1), bit_size: Field, value: 1 }, BinaryFieldOp { destination: Direct(0), op: Div, lhs: Direct(1), rhs: Direct(0) }, Stop { return_data: HeapVector { pointer: Direct(20), size: Direct(21) } }]" ], - "debug_symbols": "pZbBTuMwFEX/Jesu8t7zsx1+ZTRCoQRUKWqr0CKNEP8+tm8uA4vZJJuc04Z3Wlo7zUf3PD3dXx9P55fLW/fw66N7Wk7zfHp9nC/H8Xa6nMuzH5+Hjg8fb8s0lae6b+fL1HVcpvOtezjf5/nQvY/zvf3R23U8N97GpZztD910fi4swZfTPFX7PPyb7v8/KprXYTH7GvdN88OW+Rg4H+OGee3jOq8iO+fTlvlknE9533wOG+ZNZZ033fL9mfH1zXzLfOLnZ1l2zm/5/ILw/QfZ8v6DO+djv3N+y/r1r/XnYjvnt+w///r+3fK++aA753++/u/yaDyelh9XzM7KheLQhXb0doztmNoxt+PQjtIDAiiAeUFAUBAkBA1BRFBRVBQVRUVRUVQUFUVFS0ULSqX8Zzo0WA8IoIABAXAgAqVSLoyWgaEh9IAAChgQAAcigEpAJaDiqDgqjoqXSlnIXiplPbkDEUhABoaG2AMCKGAAKhGViEpEJaISUUmoJFQSKgmVVCqpoFTKT0yKQAIyMDTkHhBAAQNKZShwIAIJyMDQMPSAAArUb7os3yGs9JVxZVqZVw6g9D1FKEoxSqA4JVISJVNqua3nWtYqQlGKUQLFKZGSKJlSy1a3SE8RilKMEihOiZREyRSWjWVj2Vg2lus+kFClllOVSEmUTBlWqXsCIhSlGCVQWA4sB5YDy4FlZ9lZdpadZWfZWXaWnWVn2VmOLEeWI8uR5bqHJFdxSqQkSqYMq9T9BBGKUozCcmI5sZxYTiwnljPLmeXMct1p7bfnfVxO49M8rbe2L/fz8dud7u3PlWd4L3xdLsfp+b5M9RrfzpWr/l8=", + "debug_symbols": "pZbBTuMwFEX/Jesu8vz8nh1+ZTRCoQRUKUqr0CKNEP8+tm8uA4vZpBuf04Z3WtI4ykf3PD3dXh9Py8v5rXv49dE9rad5Pr0+zufjeD2dl/Lux+eh48vH6zpN5a3u2/EydRnXabl2D8ttng/d+zjf2h+9Xcal8Tqu5Wh/6KblubAEX07zVO3z8G+6//+ohLwNi+rXuO2aH/bMe+S8+4750Ps2H0TunE975pNyPuX75nPcMa9BtnkNe34/VX6+qu2ZTzx/muXO+T3nLwq/f5Q93z+acd77O+f3XL/2df5N833zMdw5//Pzf5dX4/G0/rhjdVo26qGLbbW2eltTW3Nbh7ZKDwgQAMwLAoKCICFoCCKCSkAloBJQCagEVAIqAZVQKqGgVMp/FoYG7QEBAqBABAxwoFTKjUkzMDTEHhAgAApEwAAHUImoRFQMFUPFULFSKReSlUrZD2aAAwnIwNDgPSBAABRAxVFxVBwVR8VRSagkVBIqCZVUKqmgVMotPjmQgAwMDbkHBAiAAqUyFBjgQAIyMDQMPSBAAOovXS7fIW60jb4xbcwbB1D6niKUQFFKpBjFKYmSKbXcrudaDlWEEihKiRSjOCVRMqWWtW6RniKUQFFKpBjFKYmSKSwry8qysqws130gsUotWxWnJEqmDJvUPQERSqAoJVJYjixHliPLkWVj2Vg2lo1lY9lYNpaNZWPZWHaWnWVn2Vmue0i8ilGckiiZMmxS9xNEKIGiFJYTy4nlxHJiObGcWc4sZ5brTmvPLu/jehqf5ml7tHy5LcdvT5rXPxce4bPoZT0fp+fbOtV7fDtW7vp/AQ==", "file_map": { "50": { "source": "fn main(mut x: i32, mut y: i32, z: i32) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(s1 + s2 == 13);\n assert(x + y == 13);\n\n s2 = -8;\n y = -y;\n assert(s1 + s2 == -3);\n assert(x + y == -3);\n\n s1 = -15;\n assert(s1 - s2 == -7);\n assert(z - y == -7);\n\n s1 = -5;\n s2 = 8;\n x = -x;\n y = -y;\n assert(s1 - s2 == -13);\n assert(x - y == -13);\n\n s2 = -8;\n y = -y;\n assert(s1 * s2 == 40);\n assert(x * y == 40);\n\n s1 = 1;\n s2 = -8;\n assert(s1 * s2 == -8);\n assert(x / x * y == -8);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap index 5de9f2a1a15..5da484278ba 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap @@ -63,9 +63,9 @@ expression: artifact "return value indices : []", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 })], outputs: []", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U32) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 233 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(5), source: Relative(4) }, Cast { destination: Relative(4), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(6), source: Relative(1), bit_size: Integer(U32) }, Cast { destination: Relative(7), source: Relative(2), bit_size: Integer(U32) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(9), op: LessThan, bit_size: U32, lhs: Relative(6), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(7), rhs: Relative(8) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(7) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(7) }, JumpIf { condition: Relative(4), location: 34 }, Call { location: 239 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 13 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(4) }, JumpIf { condition: Relative(7), location: 39 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(7) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(7) }, JumpIf { condition: Relative(10), location: 49 }, Call { location: 242 }, BinaryIntOp { destination: Relative(5), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(9) }, BinaryIntOp { destination: Relative(11), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(10) }, JumpIf { condition: Relative(5), location: 59 }, Call { location: 239 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 4294967293 }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(5) }, JumpIf { condition: Relative(10), location: 64 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, Cast { destination: Relative(10), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(3), op: LessThan, bit_size: U32, lhs: Relative(10), rhs: Relative(8) }, Not { destination: Relative(10), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(3) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(6) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(6) }, JumpIf { condition: Relative(5), location: 77 }, Call { location: 242 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967289 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 82 }, Const { destination: Relative(6), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(6) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(1), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(1), bit_size: Integer(U32) }, Not { destination: Relative(5), source: Relative(9), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(5) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 91 }, Call { location: 242 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, JumpIf { condition: Relative(7), location: 99 }, Call { location: 242 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U32) }, Not { destination: Relative(9), source: Relative(5), bit_size: U1 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(5) }, JumpIf { condition: Relative(3), location: 110 }, Call { location: 242 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967283 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 115 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(9) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(9) }, JumpIf { condition: Relative(5), location: 123 }, Call { location: 242 }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U64) }, Cast { destination: Relative(7), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U64) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(1), bit_size: Field }, Cast { destination: Relative(10), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(10), rhs: Relative(9) }, Const { destination: Relative(10), bit_size: Field, value: 4294967296 }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(7), bit_size: Field }, BinaryFieldOp { destination: Relative(7), op: Mul, lhs: Relative(9), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(9), op: Add, lhs: Relative(6), rhs: Relative(7) }, Not { destination: Relative(6), source: Relative(4), bit_size: U1 }, Cast { destination: Relative(7), source: Relative(2), bit_size: Field }, Cast { destination: Relative(11), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(12), op: Mul, lhs: Relative(11), rhs: Relative(7) }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(7) }, Cast { destination: Relative(7), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(7), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(7), op: Add, lhs: Relative(12), rhs: Relative(6) }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(9), rhs: Relative(7) }, Cast { destination: Relative(9), source: Relative(6), bit_size: Field }, Const { destination: Relative(11), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(12), op: LessThanEquals, lhs: Relative(9), rhs: Relative(11) }, JumpIf { condition: Relative(12), location: 151 }, Call { location: 245 }, Cast { destination: Relative(9), source: Relative(6), bit_size: Integer(U32) }, Not { destination: Relative(6), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(5), source: Relative(6), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(5) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(9), rhs: Relative(6) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(5), location: 159 }, Call { location: 239 }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 40 }, BinaryIntOp { destination: Relative(9), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(3) }, JumpIf { condition: Relative(9), location: 165 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(3), bit_size: Integer(U16), value: 248 }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U8) }, Const { destination: Relative(3), bit_size: Integer(U8), value: 248 }, BinaryIntOp { destination: Relative(9), op: Equals, bit_size: U8, lhs: Relative(5), rhs: Relative(3) }, JumpIf { condition: Relative(9), location: 172 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(5), location: 178 }, Jump { location: 180 }, Mov { destination: Relative(9), source: Relative(16) }, Jump { location: 182 }, Mov { destination: Relative(9), source: Relative(1) }, Jump { location: 182 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(11), location: 188 }, Jump { location: 190 }, Mov { destination: Relative(12), source: Relative(16) }, Jump { location: 192 }, Mov { destination: Relative(12), source: Relative(1) }, Jump { location: 192 }, BinaryIntOp { destination: Relative(3), op: Div, bit_size: U32, lhs: Relative(9), rhs: Relative(12) }, BinaryIntOp { destination: Relative(13), op: Xor, bit_size: U1, lhs: Relative(5), rhs: Relative(11) }, JumpIf { condition: Relative(13), location: 196 }, Jump { location: 198 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(14), rhs: Relative(3) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U64) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Cast { destination: Relative(1), source: Relative(5), bit_size: Integer(U64) }, Cast { destination: Relative(2), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(8) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, Not { destination: Relative(4), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(3), bit_size: Field }, Cast { destination: Relative(3), source: Relative(5), bit_size: Field }, BinaryFieldOp { destination: Relative(5), op: Mul, lhs: Relative(3), rhs: Relative(9) }, BinaryFieldOp { destination: Relative(3), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(9), rhs: Relative(3) }, BinaryFieldOp { destination: Relative(3), op: Add, lhs: Relative(5), rhs: Relative(4) }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(3), rhs: Relative(7) }, Cast { destination: Relative(3), source: Relative(4), bit_size: Field }, Const { destination: Relative(5), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(7), op: LessThanEquals, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 219 }, Call { location: 245 }, Cast { destination: Relative(3), source: Relative(4), bit_size: Integer(U32) }, Not { destination: Relative(4), source: Relative(2), bit_size: U1 }, Cast { destination: Relative(2), source: Relative(4), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(2) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 226 }, Call { location: 239 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4294967288 }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U32, lhs: Relative(2), rhs: Relative(1) }, JumpIf { condition: Relative(3), location: 232 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 238 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 5019202896831570965 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 7233212735005103307 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U32) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 226 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(5), source: Relative(4) }, Cast { destination: Relative(4), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(6), source: Relative(1), bit_size: Integer(U32) }, Cast { destination: Relative(7), source: Relative(2), bit_size: Integer(U32) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(9), op: LessThan, bit_size: U32, lhs: Relative(6), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(7), rhs: Relative(8) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(7) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(7) }, JumpIf { condition: Relative(4), location: 34 }, Call { location: 232 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 13 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(4) }, JumpIf { condition: Relative(7), location: 39 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(7) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(7) }, JumpIf { condition: Relative(10), location: 49 }, Call { location: 235 }, BinaryIntOp { destination: Relative(5), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(9) }, BinaryIntOp { destination: Relative(11), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(10) }, JumpIf { condition: Relative(5), location: 59 }, Call { location: 232 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 4294967293 }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(5) }, JumpIf { condition: Relative(10), location: 64 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, Cast { destination: Relative(10), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(3), op: LessThan, bit_size: U32, lhs: Relative(10), rhs: Relative(8) }, Not { destination: Relative(10), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(3) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(6) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(6) }, JumpIf { condition: Relative(5), location: 77 }, Call { location: 235 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967289 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 82 }, Const { destination: Relative(6), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(6) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(1), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(1), bit_size: Integer(U32) }, Not { destination: Relative(5), source: Relative(9), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(5) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 91 }, Call { location: 235 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, JumpIf { condition: Relative(7), location: 99 }, Call { location: 235 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U32) }, Not { destination: Relative(9), source: Relative(5), bit_size: U1 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(5) }, JumpIf { condition: Relative(3), location: 110 }, Call { location: 235 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967283 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 115 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(9) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(9) }, JumpIf { condition: Relative(5), location: 123 }, Call { location: 235 }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U64) }, Cast { destination: Relative(7), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U64) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(1), bit_size: Field }, Cast { destination: Relative(10), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(10), rhs: Relative(9) }, Const { destination: Relative(10), bit_size: Field, value: 4294967296 }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(7), bit_size: Field }, BinaryFieldOp { destination: Relative(7), op: Mul, lhs: Relative(9), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(9), op: Add, lhs: Relative(6), rhs: Relative(7) }, Not { destination: Relative(6), source: Relative(4), bit_size: U1 }, Cast { destination: Relative(7), source: Relative(2), bit_size: Field }, Cast { destination: Relative(11), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(12), op: Mul, lhs: Relative(11), rhs: Relative(7) }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(7) }, Cast { destination: Relative(7), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(7), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(7), op: Add, lhs: Relative(12), rhs: Relative(6) }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(9), rhs: Relative(7) }, Cast { destination: Relative(9), source: Relative(6), bit_size: Field }, Const { destination: Relative(11), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(12), op: LessThanEquals, lhs: Relative(9), rhs: Relative(11) }, JumpIf { condition: Relative(12), location: 151 }, Call { location: 238 }, Cast { destination: Relative(9), source: Relative(6), bit_size: Integer(U32) }, Not { destination: Relative(6), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(5), source: Relative(6), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(5) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(9), rhs: Relative(6) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(5), location: 159 }, Call { location: 232 }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 40 }, BinaryIntOp { destination: Relative(9), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(3) }, JumpIf { condition: Relative(9), location: 165 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(5), location: 171 }, Jump { location: 173 }, Mov { destination: Relative(9), source: Relative(16) }, Jump { location: 175 }, Mov { destination: Relative(9), source: Relative(1) }, Jump { location: 175 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(11), location: 181 }, Jump { location: 183 }, Mov { destination: Relative(12), source: Relative(16) }, Jump { location: 185 }, Mov { destination: Relative(12), source: Relative(1) }, Jump { location: 185 }, BinaryIntOp { destination: Relative(3), op: Div, bit_size: U32, lhs: Relative(9), rhs: Relative(12) }, BinaryIntOp { destination: Relative(13), op: Xor, bit_size: U1, lhs: Relative(5), rhs: Relative(11) }, JumpIf { condition: Relative(13), location: 189 }, Jump { location: 191 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(14), rhs: Relative(3) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U64) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Cast { destination: Relative(1), source: Relative(5), bit_size: Integer(U64) }, Cast { destination: Relative(2), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(8) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, Not { destination: Relative(4), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(3), bit_size: Field }, Cast { destination: Relative(3), source: Relative(5), bit_size: Field }, BinaryFieldOp { destination: Relative(5), op: Mul, lhs: Relative(3), rhs: Relative(9) }, BinaryFieldOp { destination: Relative(3), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(9), rhs: Relative(3) }, BinaryFieldOp { destination: Relative(3), op: Add, lhs: Relative(5), rhs: Relative(4) }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(3), rhs: Relative(7) }, Cast { destination: Relative(3), source: Relative(4), bit_size: Field }, Const { destination: Relative(5), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(7), op: LessThanEquals, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 212 }, Call { location: 238 }, Cast { destination: Relative(3), source: Relative(4), bit_size: Integer(U32) }, Not { destination: Relative(4), source: Relative(2), bit_size: U1 }, Cast { destination: Relative(2), source: Relative(4), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(2) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 219 }, Call { location: 232 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4294967288 }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U32, lhs: Relative(2), rhs: Relative(1) }, JumpIf { condition: Relative(3), location: 225 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 231 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 5019202896831570965 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 7233212735005103307 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "pZfLTuNAEEX/xWsvXF1V/eBXEEIhGBTJSiKTjDRC+ffp9vVlYMHG2eScYOo4it12/Nm9ji/X9+fD8e300T08fnYv82GaDu/P02m/uxxOx/rXz25oL1K6B+m7MAACBEABAxyIQAIygIqioqgoKoqK1kqocCACCchArWjf2QAIEAAFDHAgAgnIQK1Y3/kACBAABQxwIAIJyECteN/FARAgAArUSqxwIAIJyEBZkAZAgAAogEpCJaGSaiVVZKAsyAMgQK3kCgUMcCACCchAWVAGoFZKRQAUMMCBCCQgA+1ID30nw0ARSqAoxShOiZREyRSWpZWliVACRSlGaeXQJFISJVPKKstZvohQAqWVtYlRnBIpiZIpZZXlzF9EKIHCsrKsLCvLyrKyrCwby8aysWwsG8vGsrFsLBvLxrKz7Cw7y86ys+wsO8vOsrPsLLdVI9ZEKIGiFKO0sjeJlFaOTTKlrNJWEkQorZyaKMUoTomURMmUskpbXRChsJxZzixnljPLmeXMcma5sFxYLiwXlgvLheXCcmG5rUDJTQokLGtwEaEEilKM4pRISZRMYVlYFpaFZWFZWBaWhWVhWVgWlgPLgeXAcmA5sBxYDiwva7A0yZSyyrIGF2nlcrv1He93z5d5HNvt7tsNsN4Wz7t5PF66h+N1mvruz266Lv/0cd4dF152c91ar0nj8bWyBt8O09js1v+fHn4frVeKdbheBr7GfdN82TIfjfMxbpiv58o6X0+EO+fTlvmknE/5vvlsG+Y1yDqvYcvxU+X+VX3LfOL3p1nunN/y/Znw85ts+fzmzvk43Dm/5fz1r/PPRe+c37L+/Ov4u+b75i3cOf9z/0/13W5/mH88EtxaaT7sXqZxfft2Pe6/bb38PXMLHynO82k/vl7nsZW+PVfU18dQdx80P7XfYO2thT6YPd3a7v8B", + "debug_symbols": "pZZBbqNAEEXvwpoF1VXVXeQqoyhyEhJZQrZF7JFGke8+3Xz/TLKYDd74PULqYQFt+Oxep+fL+9P+8Hb86B5+fXbPy36e9+9P8/Fld94fD/Wvn93QPmTsHqTv0gAIkAAFDHAgAwUIABVFRVFRVBQVrZVU4UAGChBArWjf2QAIkAAFDHAgAwUIoFas73wABEiAAgY4kIECBFAr3nd5AARIgAK1kiscyEABAhhXlAEQIAEKoFJQKaiUWikVAYwrYgAEqJWoUMAABzJQgADGFeMA1MpYkQAFDHAgAwUIoF3poe9kGChCSRSlGMUpmVIoQWFZWlmaCCVRlGKUVk5NMqVQgjLeZL3LVxFKorSyNjGKUzKlUIIy3mS981cRSqKwrCwry8qysqwsK8vGsrFsLBvLxrKxbCwby8aysewsO8vOsrPsLDvLzrKz7Cw7y23ViDURSqIoxSit7E0ypVCCMt6krSSIUBJFKUZhubBcWC4sF5aD5WA5WA6Wg+VgOVgOloPlYHlkua05yU0SRSlGcUqmFEpQRkha1+AqQkkUpRjFKZlSKEFhWVgWloVlYVlYFpaFZWFZWBaW1zVYmgglUZTSyuV67Ts+sJ7OyzS159W3J1h9rp12y3Q4dw+Hyzz33e/dfFn/6eO0O6w875a6t/6oTIfXyhp8289Ts2v/b3r4/2hd6rfhuo6/xn3T/LhlPhvnc94wXy/2bb5eyTvny5b5opwvcd982IZ5TXKb17Tl+qny+Kq+Zb7w/GnInfNbzp8Jv7/Jlu9v7pzPw53zW+5f/zr/rnHfvKU7538e/7Fu7V72y4936msrLfvd8zzdNt8uh5dve89/TtzDd/LTcnyZXi/L1ErfXszr56+Ucp9UHttLTNtUr5vl8doO/xc=", "file_map": { "50": { "source": "fn main(mut x: i32, mut y: i32, z: i32) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(s1 + s2 == 13);\n assert(x + y == 13);\n\n s2 = -8;\n y = -y;\n assert(s1 + s2 == -3);\n assert(x + y == -3);\n\n s1 = -15;\n assert(s1 - s2 == -7);\n assert(z - y == -7);\n\n s1 = -5;\n s2 = 8;\n x = -x;\n y = -y;\n assert(s1 - s2 == -13);\n assert(x - y == -13);\n\n s2 = -8;\n y = -y;\n assert(s1 * s2 == 40);\n assert(x * y == 40);\n\n s1 = 1;\n s2 = -8;\n assert(s1 * s2 == -8);\n assert(x / x * y == -8);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_0.snap index 5de9f2a1a15..5da484278ba 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_0.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_0.snap @@ -63,9 +63,9 @@ expression: artifact "return value indices : []", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 })], outputs: []", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U32) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 233 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(5), source: Relative(4) }, Cast { destination: Relative(4), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(6), source: Relative(1), bit_size: Integer(U32) }, Cast { destination: Relative(7), source: Relative(2), bit_size: Integer(U32) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(9), op: LessThan, bit_size: U32, lhs: Relative(6), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(7), rhs: Relative(8) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(7) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(7) }, JumpIf { condition: Relative(4), location: 34 }, Call { location: 239 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 13 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(4) }, JumpIf { condition: Relative(7), location: 39 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(7) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(7) }, JumpIf { condition: Relative(10), location: 49 }, Call { location: 242 }, BinaryIntOp { destination: Relative(5), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(9) }, BinaryIntOp { destination: Relative(11), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(10) }, JumpIf { condition: Relative(5), location: 59 }, Call { location: 239 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 4294967293 }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(5) }, JumpIf { condition: Relative(10), location: 64 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, Cast { destination: Relative(10), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(3), op: LessThan, bit_size: U32, lhs: Relative(10), rhs: Relative(8) }, Not { destination: Relative(10), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(3) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(6) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(6) }, JumpIf { condition: Relative(5), location: 77 }, Call { location: 242 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967289 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 82 }, Const { destination: Relative(6), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(6) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(1), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(1), bit_size: Integer(U32) }, Not { destination: Relative(5), source: Relative(9), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(5) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 91 }, Call { location: 242 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, JumpIf { condition: Relative(7), location: 99 }, Call { location: 242 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U32) }, Not { destination: Relative(9), source: Relative(5), bit_size: U1 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(5) }, JumpIf { condition: Relative(3), location: 110 }, Call { location: 242 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967283 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 115 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(9) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(9) }, JumpIf { condition: Relative(5), location: 123 }, Call { location: 242 }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U64) }, Cast { destination: Relative(7), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U64) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(1), bit_size: Field }, Cast { destination: Relative(10), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(10), rhs: Relative(9) }, Const { destination: Relative(10), bit_size: Field, value: 4294967296 }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(7), bit_size: Field }, BinaryFieldOp { destination: Relative(7), op: Mul, lhs: Relative(9), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(9), op: Add, lhs: Relative(6), rhs: Relative(7) }, Not { destination: Relative(6), source: Relative(4), bit_size: U1 }, Cast { destination: Relative(7), source: Relative(2), bit_size: Field }, Cast { destination: Relative(11), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(12), op: Mul, lhs: Relative(11), rhs: Relative(7) }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(7) }, Cast { destination: Relative(7), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(7), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(7), op: Add, lhs: Relative(12), rhs: Relative(6) }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(9), rhs: Relative(7) }, Cast { destination: Relative(9), source: Relative(6), bit_size: Field }, Const { destination: Relative(11), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(12), op: LessThanEquals, lhs: Relative(9), rhs: Relative(11) }, JumpIf { condition: Relative(12), location: 151 }, Call { location: 245 }, Cast { destination: Relative(9), source: Relative(6), bit_size: Integer(U32) }, Not { destination: Relative(6), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(5), source: Relative(6), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(5) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(9), rhs: Relative(6) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(5), location: 159 }, Call { location: 239 }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 40 }, BinaryIntOp { destination: Relative(9), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(3) }, JumpIf { condition: Relative(9), location: 165 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(3), bit_size: Integer(U16), value: 248 }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U8) }, Const { destination: Relative(3), bit_size: Integer(U8), value: 248 }, BinaryIntOp { destination: Relative(9), op: Equals, bit_size: U8, lhs: Relative(5), rhs: Relative(3) }, JumpIf { condition: Relative(9), location: 172 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(5), location: 178 }, Jump { location: 180 }, Mov { destination: Relative(9), source: Relative(16) }, Jump { location: 182 }, Mov { destination: Relative(9), source: Relative(1) }, Jump { location: 182 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(11), location: 188 }, Jump { location: 190 }, Mov { destination: Relative(12), source: Relative(16) }, Jump { location: 192 }, Mov { destination: Relative(12), source: Relative(1) }, Jump { location: 192 }, BinaryIntOp { destination: Relative(3), op: Div, bit_size: U32, lhs: Relative(9), rhs: Relative(12) }, BinaryIntOp { destination: Relative(13), op: Xor, bit_size: U1, lhs: Relative(5), rhs: Relative(11) }, JumpIf { condition: Relative(13), location: 196 }, Jump { location: 198 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(14), rhs: Relative(3) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U64) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Cast { destination: Relative(1), source: Relative(5), bit_size: Integer(U64) }, Cast { destination: Relative(2), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(8) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, Not { destination: Relative(4), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(3), bit_size: Field }, Cast { destination: Relative(3), source: Relative(5), bit_size: Field }, BinaryFieldOp { destination: Relative(5), op: Mul, lhs: Relative(3), rhs: Relative(9) }, BinaryFieldOp { destination: Relative(3), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(9), rhs: Relative(3) }, BinaryFieldOp { destination: Relative(3), op: Add, lhs: Relative(5), rhs: Relative(4) }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(3), rhs: Relative(7) }, Cast { destination: Relative(3), source: Relative(4), bit_size: Field }, Const { destination: Relative(5), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(7), op: LessThanEquals, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 219 }, Call { location: 245 }, Cast { destination: Relative(3), source: Relative(4), bit_size: Integer(U32) }, Not { destination: Relative(4), source: Relative(2), bit_size: U1 }, Cast { destination: Relative(2), source: Relative(4), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(2) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 226 }, Call { location: 239 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4294967288 }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U32, lhs: Relative(2), rhs: Relative(1) }, JumpIf { condition: Relative(3), location: 232 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 238 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 5019202896831570965 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 7233212735005103307 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U32) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 226 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(5), source: Relative(4) }, Cast { destination: Relative(4), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(6), source: Relative(1), bit_size: Integer(U32) }, Cast { destination: Relative(7), source: Relative(2), bit_size: Integer(U32) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(9), op: LessThan, bit_size: U32, lhs: Relative(6), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(7), rhs: Relative(8) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(7) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(7) }, JumpIf { condition: Relative(4), location: 34 }, Call { location: 232 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 13 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(4) }, JumpIf { condition: Relative(7), location: 39 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(7) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(7) }, JumpIf { condition: Relative(10), location: 49 }, Call { location: 235 }, BinaryIntOp { destination: Relative(5), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(9) }, BinaryIntOp { destination: Relative(11), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(10) }, JumpIf { condition: Relative(5), location: 59 }, Call { location: 232 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 4294967293 }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(5) }, JumpIf { condition: Relative(10), location: 64 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, Cast { destination: Relative(10), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(3), op: LessThan, bit_size: U32, lhs: Relative(10), rhs: Relative(8) }, Not { destination: Relative(10), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(3) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(6) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(6) }, JumpIf { condition: Relative(5), location: 77 }, Call { location: 235 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967289 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 82 }, Const { destination: Relative(6), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(6) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(1), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(1), bit_size: Integer(U32) }, Not { destination: Relative(5), source: Relative(9), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(5) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 91 }, Call { location: 235 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, JumpIf { condition: Relative(7), location: 99 }, Call { location: 235 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U32) }, Not { destination: Relative(9), source: Relative(5), bit_size: U1 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(5) }, JumpIf { condition: Relative(3), location: 110 }, Call { location: 235 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967283 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 115 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(9) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(9) }, JumpIf { condition: Relative(5), location: 123 }, Call { location: 235 }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U64) }, Cast { destination: Relative(7), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U64) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(1), bit_size: Field }, Cast { destination: Relative(10), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(10), rhs: Relative(9) }, Const { destination: Relative(10), bit_size: Field, value: 4294967296 }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(7), bit_size: Field }, BinaryFieldOp { destination: Relative(7), op: Mul, lhs: Relative(9), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(9), op: Add, lhs: Relative(6), rhs: Relative(7) }, Not { destination: Relative(6), source: Relative(4), bit_size: U1 }, Cast { destination: Relative(7), source: Relative(2), bit_size: Field }, Cast { destination: Relative(11), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(12), op: Mul, lhs: Relative(11), rhs: Relative(7) }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(7) }, Cast { destination: Relative(7), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(7), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(7), op: Add, lhs: Relative(12), rhs: Relative(6) }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(9), rhs: Relative(7) }, Cast { destination: Relative(9), source: Relative(6), bit_size: Field }, Const { destination: Relative(11), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(12), op: LessThanEquals, lhs: Relative(9), rhs: Relative(11) }, JumpIf { condition: Relative(12), location: 151 }, Call { location: 238 }, Cast { destination: Relative(9), source: Relative(6), bit_size: Integer(U32) }, Not { destination: Relative(6), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(5), source: Relative(6), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(5) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(9), rhs: Relative(6) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(5), location: 159 }, Call { location: 232 }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 40 }, BinaryIntOp { destination: Relative(9), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(3) }, JumpIf { condition: Relative(9), location: 165 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(5), location: 171 }, Jump { location: 173 }, Mov { destination: Relative(9), source: Relative(16) }, Jump { location: 175 }, Mov { destination: Relative(9), source: Relative(1) }, Jump { location: 175 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(11), location: 181 }, Jump { location: 183 }, Mov { destination: Relative(12), source: Relative(16) }, Jump { location: 185 }, Mov { destination: Relative(12), source: Relative(1) }, Jump { location: 185 }, BinaryIntOp { destination: Relative(3), op: Div, bit_size: U32, lhs: Relative(9), rhs: Relative(12) }, BinaryIntOp { destination: Relative(13), op: Xor, bit_size: U1, lhs: Relative(5), rhs: Relative(11) }, JumpIf { condition: Relative(13), location: 189 }, Jump { location: 191 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(14), rhs: Relative(3) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U64) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Cast { destination: Relative(1), source: Relative(5), bit_size: Integer(U64) }, Cast { destination: Relative(2), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(8) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, Not { destination: Relative(4), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(3), bit_size: Field }, Cast { destination: Relative(3), source: Relative(5), bit_size: Field }, BinaryFieldOp { destination: Relative(5), op: Mul, lhs: Relative(3), rhs: Relative(9) }, BinaryFieldOp { destination: Relative(3), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(9), rhs: Relative(3) }, BinaryFieldOp { destination: Relative(3), op: Add, lhs: Relative(5), rhs: Relative(4) }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(3), rhs: Relative(7) }, Cast { destination: Relative(3), source: Relative(4), bit_size: Field }, Const { destination: Relative(5), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(7), op: LessThanEquals, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 212 }, Call { location: 238 }, Cast { destination: Relative(3), source: Relative(4), bit_size: Integer(U32) }, Not { destination: Relative(4), source: Relative(2), bit_size: U1 }, Cast { destination: Relative(2), source: Relative(4), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(2) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 219 }, Call { location: 232 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4294967288 }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U32, lhs: Relative(2), rhs: Relative(1) }, JumpIf { condition: Relative(3), location: 225 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 231 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 5019202896831570965 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 7233212735005103307 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "pZfLTuNAEEX/xWsvXF1V/eBXEEIhGBTJSiKTjDRC+ffp9vVlYMHG2eScYOo4it12/Nm9ji/X9+fD8e300T08fnYv82GaDu/P02m/uxxOx/rXz25oL1K6B+m7MAACBEABAxyIQAIygIqioqgoKoqK1kqocCACCchArWjf2QAIEAAFDHAgAgnIQK1Y3/kACBAABQxwIAIJyECteN/FARAgAArUSqxwIAIJyEBZkAZAgAAogEpCJaGSaiVVZKAsyAMgQK3kCgUMcCACCchAWVAGoFZKRQAUMMCBCCQgA+1ID30nw0ARSqAoxShOiZREyRSWpZWliVACRSlGaeXQJFISJVPKKstZvohQAqWVtYlRnBIpiZIpZZXlzF9EKIHCsrKsLCvLyrKyrCwby8aysWwsG8vGsrFsLBvLxrKz7Cw7y86ys+wsO8vOsrPsLLdVI9ZEKIGiFKO0sjeJlFaOTTKlrNJWEkQorZyaKMUoTomURMmUskpbXRChsJxZzixnljPLmeXMcma5sFxYLiwXlgvLheXCcmG5rUDJTQokLGtwEaEEilKM4pRISZRMYVlYFpaFZWFZWBaWhWVhWVgWlgPLgeXAcmA5sBxYDiwva7A0yZSyyrIGF2nlcrv1He93z5d5HNvt7tsNsN4Wz7t5PF66h+N1mvruz266Lv/0cd4dF152c91ar0nj8bWyBt8O09js1v+fHn4frVeKdbheBr7GfdN82TIfjfMxbpiv58o6X0+EO+fTlvmknE/5vvlsG+Y1yDqvYcvxU+X+VX3LfOL3p1nunN/y/Znw85ts+fzmzvk43Dm/5fz1r/PPRe+c37L+/Ov4u+b75i3cOf9z/0/13W5/mH88EtxaaT7sXqZxfft2Pe6/bb38PXMLHynO82k/vl7nsZW+PVfU18dQdx80P7XfYO2thT6YPd3a7v8B", + "debug_symbols": "pZZBbqNAEEXvwpoF1VXVXeQqoyhyEhJZQrZF7JFGke8+3Xz/TLKYDd74PULqYQFt+Oxep+fL+9P+8Hb86B5+fXbPy36e9+9P8/Fld94fD/Wvn93QPmTsHqTv0gAIkAAFDHAgAwUIABVFRVFRVBQVrZVU4UAGChBArWjf2QAIkAAFDHAgAwUIoFas73wABEiAAgY4kIECBFAr3nd5AARIgAK1kiscyEABAhhXlAEQIAEKoFJQKaiUWikVAYwrYgAEqJWoUMAABzJQgADGFeMA1MpYkQAFDHAgAwUIoF3poe9kGChCSRSlGMUpmVIoQWFZWlmaCCVRlGKUVk5NMqVQgjLeZL3LVxFKorSyNjGKUzKlUIIy3mS981cRSqKwrCwry8qysqwsK8vGsrFsLBvLxrKxbCwby8aysewsO8vOsrPsLDvLzrKz7Cw7y23ViDURSqIoxSit7E0ypVCCMt6krSSIUBJFKUZhubBcWC4sF5aD5WA5WA6Wg+VgOVgOloPlYHlkua05yU0SRSlGcUqmFEpQRkha1+AqQkkUpRjFKZlSKEFhWVgWloVlYVlYFpaFZWFZWBaW1zVYmgglUZTSyuV67Ts+sJ7OyzS159W3J1h9rp12y3Q4dw+Hyzz33e/dfFn/6eO0O6w875a6t/6oTIfXyhp8289Ts2v/b3r4/2hd6rfhuo6/xn3T/LhlPhvnc94wXy/2bb5eyTvny5b5opwvcd982IZ5TXKb17Tl+qny+Kq+Zb7w/GnInfNbzp8Jv7/Jlu9v7pzPw53zW+5f/zr/rnHfvKU7538e/7Fu7V72y4936msrLfvd8zzdNt8uh5dve89/TtzDd/LTcnyZXi/L1ErfXszr56+Ucp9UHttLTNtUr5vl8doO/xc=", "file_map": { "50": { "source": "fn main(mut x: i32, mut y: i32, z: i32) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(s1 + s2 == 13);\n assert(x + y == 13);\n\n s2 = -8;\n y = -y;\n assert(s1 + s2 == -3);\n assert(x + y == -3);\n\n s1 = -15;\n assert(s1 - s2 == -7);\n assert(z - y == -7);\n\n s1 = -5;\n s2 = 8;\n x = -x;\n y = -y;\n assert(s1 - s2 == -13);\n assert(x - y == -13);\n\n s2 = -8;\n y = -y;\n assert(s1 * s2 == 40);\n assert(x * y == 40);\n\n s1 = 1;\n s2 = -8;\n assert(s1 * s2 == -8);\n assert(x / x * y == -8);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_9223372036854775807.snap index 5de9f2a1a15..5da484278ba 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_9223372036854775807.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_arithmetic/execute__tests__force_brillig_true_inliner_9223372036854775807.snap @@ -63,9 +63,9 @@ expression: artifact "return value indices : []", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 })], outputs: []", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U32) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 233 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(5), source: Relative(4) }, Cast { destination: Relative(4), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(6), source: Relative(1), bit_size: Integer(U32) }, Cast { destination: Relative(7), source: Relative(2), bit_size: Integer(U32) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(9), op: LessThan, bit_size: U32, lhs: Relative(6), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(7), rhs: Relative(8) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(7) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(7) }, JumpIf { condition: Relative(4), location: 34 }, Call { location: 239 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 13 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(4) }, JumpIf { condition: Relative(7), location: 39 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(7) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(7) }, JumpIf { condition: Relative(10), location: 49 }, Call { location: 242 }, BinaryIntOp { destination: Relative(5), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(9) }, BinaryIntOp { destination: Relative(11), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(10) }, JumpIf { condition: Relative(5), location: 59 }, Call { location: 239 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 4294967293 }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(5) }, JumpIf { condition: Relative(10), location: 64 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, Cast { destination: Relative(10), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(3), op: LessThan, bit_size: U32, lhs: Relative(10), rhs: Relative(8) }, Not { destination: Relative(10), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(3) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(6) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(6) }, JumpIf { condition: Relative(5), location: 77 }, Call { location: 242 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967289 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 82 }, Const { destination: Relative(6), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(6) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(1), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(1), bit_size: Integer(U32) }, Not { destination: Relative(5), source: Relative(9), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(5) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 91 }, Call { location: 242 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, JumpIf { condition: Relative(7), location: 99 }, Call { location: 242 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U32) }, Not { destination: Relative(9), source: Relative(5), bit_size: U1 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(5) }, JumpIf { condition: Relative(3), location: 110 }, Call { location: 242 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967283 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 115 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(9) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(9) }, JumpIf { condition: Relative(5), location: 123 }, Call { location: 242 }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U64) }, Cast { destination: Relative(7), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U64) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(1), bit_size: Field }, Cast { destination: Relative(10), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(10), rhs: Relative(9) }, Const { destination: Relative(10), bit_size: Field, value: 4294967296 }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(7), bit_size: Field }, BinaryFieldOp { destination: Relative(7), op: Mul, lhs: Relative(9), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(9), op: Add, lhs: Relative(6), rhs: Relative(7) }, Not { destination: Relative(6), source: Relative(4), bit_size: U1 }, Cast { destination: Relative(7), source: Relative(2), bit_size: Field }, Cast { destination: Relative(11), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(12), op: Mul, lhs: Relative(11), rhs: Relative(7) }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(7) }, Cast { destination: Relative(7), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(7), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(7), op: Add, lhs: Relative(12), rhs: Relative(6) }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(9), rhs: Relative(7) }, Cast { destination: Relative(9), source: Relative(6), bit_size: Field }, Const { destination: Relative(11), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(12), op: LessThanEquals, lhs: Relative(9), rhs: Relative(11) }, JumpIf { condition: Relative(12), location: 151 }, Call { location: 245 }, Cast { destination: Relative(9), source: Relative(6), bit_size: Integer(U32) }, Not { destination: Relative(6), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(5), source: Relative(6), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(5) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(9), rhs: Relative(6) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(5), location: 159 }, Call { location: 239 }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 40 }, BinaryIntOp { destination: Relative(9), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(3) }, JumpIf { condition: Relative(9), location: 165 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(3), bit_size: Integer(U16), value: 248 }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U8) }, Const { destination: Relative(3), bit_size: Integer(U8), value: 248 }, BinaryIntOp { destination: Relative(9), op: Equals, bit_size: U8, lhs: Relative(5), rhs: Relative(3) }, JumpIf { condition: Relative(9), location: 172 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(5), location: 178 }, Jump { location: 180 }, Mov { destination: Relative(9), source: Relative(16) }, Jump { location: 182 }, Mov { destination: Relative(9), source: Relative(1) }, Jump { location: 182 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(11), location: 188 }, Jump { location: 190 }, Mov { destination: Relative(12), source: Relative(16) }, Jump { location: 192 }, Mov { destination: Relative(12), source: Relative(1) }, Jump { location: 192 }, BinaryIntOp { destination: Relative(3), op: Div, bit_size: U32, lhs: Relative(9), rhs: Relative(12) }, BinaryIntOp { destination: Relative(13), op: Xor, bit_size: U1, lhs: Relative(5), rhs: Relative(11) }, JumpIf { condition: Relative(13), location: 196 }, Jump { location: 198 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(14), rhs: Relative(3) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U64) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Cast { destination: Relative(1), source: Relative(5), bit_size: Integer(U64) }, Cast { destination: Relative(2), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(8) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, Not { destination: Relative(4), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(3), bit_size: Field }, Cast { destination: Relative(3), source: Relative(5), bit_size: Field }, BinaryFieldOp { destination: Relative(5), op: Mul, lhs: Relative(3), rhs: Relative(9) }, BinaryFieldOp { destination: Relative(3), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(9), rhs: Relative(3) }, BinaryFieldOp { destination: Relative(3), op: Add, lhs: Relative(5), rhs: Relative(4) }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(3), rhs: Relative(7) }, Cast { destination: Relative(3), source: Relative(4), bit_size: Field }, Const { destination: Relative(5), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(7), op: LessThanEquals, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 219 }, Call { location: 245 }, Cast { destination: Relative(3), source: Relative(4), bit_size: Integer(U32) }, Not { destination: Relative(4), source: Relative(2), bit_size: U1 }, Cast { destination: Relative(2), source: Relative(4), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(2) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 226 }, Call { location: 239 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4294967288 }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U32, lhs: Relative(2), rhs: Relative(1) }, JumpIf { condition: Relative(3), location: 232 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 238 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 5019202896831570965 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 7233212735005103307 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U32) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 226 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(5), source: Relative(4) }, Cast { destination: Relative(4), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(6), source: Relative(1), bit_size: Integer(U32) }, Cast { destination: Relative(7), source: Relative(2), bit_size: Integer(U32) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(9), op: LessThan, bit_size: U32, lhs: Relative(6), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(7), rhs: Relative(8) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(7) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(7) }, JumpIf { condition: Relative(4), location: 34 }, Call { location: 232 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 13 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(4) }, JumpIf { condition: Relative(7), location: 39 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(7) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(7) }, JumpIf { condition: Relative(10), location: 49 }, Call { location: 235 }, BinaryIntOp { destination: Relative(5), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U1, lhs: Relative(9), rhs: Relative(6) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(9) }, BinaryIntOp { destination: Relative(11), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(10) }, JumpIf { condition: Relative(5), location: 59 }, Call { location: 232 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 4294967293 }, BinaryIntOp { destination: Relative(10), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(5) }, JumpIf { condition: Relative(10), location: 64 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(5), op: Sub, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(5) }, Cast { destination: Relative(5), source: Relative(7), bit_size: Integer(U32) }, Cast { destination: Relative(10), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(3), op: LessThan, bit_size: U32, lhs: Relative(10), rhs: Relative(8) }, Not { destination: Relative(10), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(5), rhs: Relative(8) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(11), rhs: Relative(3) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(6) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(6) }, JumpIf { condition: Relative(5), location: 77 }, Call { location: 235 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967289 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 82 }, Const { destination: Relative(6), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(6) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(1), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(1), bit_size: Integer(U32) }, Not { destination: Relative(5), source: Relative(9), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(5) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 91 }, Call { location: 235 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(10) }, JumpIf { condition: Relative(7), location: 99 }, Call { location: 235 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(7), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U32) }, Not { destination: Relative(9), source: Relative(5), bit_size: U1 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(6) }, BinaryIntOp { destination: Relative(10), op: Mul, bit_size: U1, lhs: Relative(3), rhs: Relative(5) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(5) }, JumpIf { condition: Relative(3), location: 110 }, Call { location: 235 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967283 }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U32, lhs: Relative(7), rhs: Relative(3) }, JumpIf { condition: Relative(5), location: 115 }, Const { destination: Relative(10), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(10) } }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U1, lhs: Relative(4), rhs: Relative(9) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(3), rhs: Relative(9) }, JumpIf { condition: Relative(5), location: 123 }, Call { location: 235 }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U64) }, Cast { destination: Relative(7), source: Relative(5), bit_size: Integer(U32) }, Cast { destination: Relative(3), source: Relative(7), bit_size: Integer(U64) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, Not { destination: Relative(7), source: Relative(6), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(1), bit_size: Field }, Cast { destination: Relative(10), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(10), rhs: Relative(9) }, Const { destination: Relative(10), bit_size: Field, value: 4294967296 }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(7), bit_size: Field }, BinaryFieldOp { destination: Relative(7), op: Mul, lhs: Relative(9), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(9), op: Add, lhs: Relative(6), rhs: Relative(7) }, Not { destination: Relative(6), source: Relative(4), bit_size: U1 }, Cast { destination: Relative(7), source: Relative(2), bit_size: Field }, Cast { destination: Relative(11), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(12), op: Mul, lhs: Relative(11), rhs: Relative(7) }, BinaryFieldOp { destination: Relative(11), op: Sub, lhs: Relative(10), rhs: Relative(7) }, Cast { destination: Relative(7), source: Relative(6), bit_size: Field }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(7), rhs: Relative(11) }, BinaryFieldOp { destination: Relative(7), op: Add, lhs: Relative(12), rhs: Relative(6) }, BinaryFieldOp { destination: Relative(6), op: Mul, lhs: Relative(9), rhs: Relative(7) }, Cast { destination: Relative(9), source: Relative(6), bit_size: Field }, Const { destination: Relative(11), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(12), op: LessThanEquals, lhs: Relative(9), rhs: Relative(11) }, JumpIf { condition: Relative(12), location: 151 }, Call { location: 238 }, Cast { destination: Relative(9), source: Relative(6), bit_size: Integer(U32) }, Not { destination: Relative(6), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(5), source: Relative(6), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(5) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(9), rhs: Relative(6) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(5), location: 159 }, Call { location: 232 }, Cast { destination: Relative(5), source: Relative(3), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 40 }, BinaryIntOp { destination: Relative(9), op: Equals, bit_size: U32, lhs: Relative(5), rhs: Relative(3) }, JumpIf { condition: Relative(9), location: 165 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(5), location: 171 }, Jump { location: 173 }, Mov { destination: Relative(9), source: Relative(16) }, Jump { location: 175 }, Mov { destination: Relative(9), source: Relative(1) }, Jump { location: 175 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2147483647 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U32, lhs: Relative(14), rhs: Relative(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(16), op: Sub, bit_size: U32, lhs: Relative(15), rhs: Relative(1) }, JumpIf { condition: Relative(11), location: 181 }, Jump { location: 183 }, Mov { destination: Relative(12), source: Relative(16) }, Jump { location: 185 }, Mov { destination: Relative(12), source: Relative(1) }, Jump { location: 185 }, BinaryIntOp { destination: Relative(3), op: Div, bit_size: U32, lhs: Relative(9), rhs: Relative(12) }, BinaryIntOp { destination: Relative(13), op: Xor, bit_size: U1, lhs: Relative(5), rhs: Relative(11) }, JumpIf { condition: Relative(13), location: 189 }, Jump { location: 191 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(14), rhs: Relative(3) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U64) }, Cast { destination: Relative(5), source: Relative(2), bit_size: Integer(U32) }, Cast { destination: Relative(1), source: Relative(5), bit_size: Integer(U64) }, Cast { destination: Relative(2), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(8) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, Not { destination: Relative(4), source: Relative(5), bit_size: U1 }, Cast { destination: Relative(9), source: Relative(3), bit_size: Field }, Cast { destination: Relative(3), source: Relative(5), bit_size: Field }, BinaryFieldOp { destination: Relative(5), op: Mul, lhs: Relative(3), rhs: Relative(9) }, BinaryFieldOp { destination: Relative(3), op: Sub, lhs: Relative(10), rhs: Relative(9) }, Cast { destination: Relative(9), source: Relative(4), bit_size: Field }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(9), rhs: Relative(3) }, BinaryFieldOp { destination: Relative(3), op: Add, lhs: Relative(5), rhs: Relative(4) }, BinaryFieldOp { destination: Relative(4), op: Mul, lhs: Relative(3), rhs: Relative(7) }, Cast { destination: Relative(3), source: Relative(4), bit_size: Field }, Const { destination: Relative(5), bit_size: Field, value: 4294967295 }, BinaryFieldOp { destination: Relative(7), op: LessThanEquals, lhs: Relative(3), rhs: Relative(5) }, JumpIf { condition: Relative(7), location: 212 }, Call { location: 238 }, Cast { destination: Relative(3), source: Relative(4), bit_size: Integer(U32) }, Not { destination: Relative(4), source: Relative(2), bit_size: U1 }, Cast { destination: Relative(2), source: Relative(4), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(8), rhs: Relative(2) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 219 }, Call { location: 232 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4294967288 }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U32, lhs: Relative(2), rhs: Relative(1) }, JumpIf { condition: Relative(3), location: 225 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 231 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 5019202896831570965 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 7233212735005103307 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "pZfLTuNAEEX/xWsvXF1V/eBXEEIhGBTJSiKTjDRC+ffp9vVlYMHG2eScYOo4it12/Nm9ji/X9+fD8e300T08fnYv82GaDu/P02m/uxxOx/rXz25oL1K6B+m7MAACBEABAxyIQAIygIqioqgoKoqK1kqocCACCchArWjf2QAIEAAFDHAgAgnIQK1Y3/kACBAABQxwIAIJyECteN/FARAgAArUSqxwIAIJyEBZkAZAgAAogEpCJaGSaiVVZKAsyAMgQK3kCgUMcCACCchAWVAGoFZKRQAUMMCBCCQgA+1ID30nw0ARSqAoxShOiZREyRSWpZWliVACRSlGaeXQJFISJVPKKstZvohQAqWVtYlRnBIpiZIpZZXlzF9EKIHCsrKsLCvLyrKyrCwby8aysWwsG8vGsrFsLBvLxrKz7Cw7y86ys+wsO8vOsrPsLLdVI9ZEKIGiFKO0sjeJlFaOTTKlrNJWEkQorZyaKMUoTomURMmUskpbXRChsJxZzixnljPLmeXMcma5sFxYLiwXlgvLheXCcmG5rUDJTQokLGtwEaEEilKM4pRISZRMYVlYFpaFZWFZWBaWhWVhWVgWlgPLgeXAcmA5sBxYDiwva7A0yZSyyrIGF2nlcrv1He93z5d5HNvt7tsNsN4Wz7t5PF66h+N1mvruz266Lv/0cd4dF152c91ar0nj8bWyBt8O09js1v+fHn4frVeKdbheBr7GfdN82TIfjfMxbpiv58o6X0+EO+fTlvmknE/5vvlsG+Y1yDqvYcvxU+X+VX3LfOL3p1nunN/y/Znw85ts+fzmzvk43Dm/5fz1r/PPRe+c37L+/Ov4u+b75i3cOf9z/0/13W5/mH88EtxaaT7sXqZxfft2Pe6/bb38PXMLHynO82k/vl7nsZW+PVfU18dQdx80P7XfYO2thT6YPd3a7v8B", + "debug_symbols": "pZZBbqNAEEXvwpoF1VXVXeQqoyhyEhJZQrZF7JFGke8+3Xz/TLKYDd74PULqYQFt+Oxep+fL+9P+8Hb86B5+fXbPy36e9+9P8/Fld94fD/Wvn93QPmTsHqTv0gAIkAAFDHAgAwUIABVFRVFRVBQVrZVU4UAGChBArWjf2QAIkAAFDHAgAwUIoFas73wABEiAAgY4kIECBFAr3nd5AARIgAK1kiscyEABAhhXlAEQIAEKoFJQKaiUWikVAYwrYgAEqJWoUMAABzJQgADGFeMA1MpYkQAFDHAgAwUIoF3poe9kGChCSRSlGMUpmVIoQWFZWlmaCCVRlGKUVk5NMqVQgjLeZL3LVxFKorSyNjGKUzKlUIIy3mS981cRSqKwrCwry8qysqwsK8vGsrFsLBvLxrKxbCwby8aysewsO8vOsrPsLDvLzrKz7Cw7y23ViDURSqIoxSit7E0ypVCCMt6krSSIUBJFKUZhubBcWC4sF5aD5WA5WA6Wg+VgOVgOloPlYHlkua05yU0SRSlGcUqmFEpQRkha1+AqQkkUpRjFKZlSKEFhWVgWloVlYVlYFpaFZWFZWBaW1zVYmgglUZTSyuV67Ts+sJ7OyzS159W3J1h9rp12y3Q4dw+Hyzz33e/dfFn/6eO0O6w875a6t/6oTIfXyhp8289Ts2v/b3r4/2hd6rfhuo6/xn3T/LhlPhvnc94wXy/2bb5eyTvny5b5opwvcd982IZ5TXKb17Tl+qny+Kq+Zb7w/GnInfNbzp8Jv7/Jlu9v7pzPw53zW+5f/zr/rnHfvKU7538e/7Fu7V72y4936msrLfvd8zzdNt8uh5dve89/TtzDd/LTcnyZXi/L1ErfXszr56+Ucp9UHttLTNtUr5vl8doO/xc=", "file_map": { "50": { "source": "fn main(mut x: i32, mut y: i32, z: i32) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(s1 + s2 == 13);\n assert(x + y == 13);\n\n s2 = -8;\n y = -y;\n assert(s1 + s2 == -3);\n assert(x + y == -3);\n\n s1 = -15;\n assert(s1 - s2 == -7);\n assert(z - y == -7);\n\n s1 = -5;\n s2 = 8;\n x = -x;\n y = -y;\n assert(s1 - s2 == -13);\n assert(x - y == -13);\n\n s2 = -8;\n y = -y;\n assert(s1 * s2 == 40);\n assert(x * y == 40);\n\n s1 = 1;\n s2 = -8;\n assert(s1 * s2 == -8);\n assert(x / x * y == -8);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap index 107be95a6e9..dd548a3c9c0 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap @@ -197,7 +197,7 @@ expression: artifact "unconstrained func 1", "[Const { destination: Direct(21), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(20), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(21), offset_address: Direct(20) }, Const { destination: Direct(2), bit_size: Field, value: 0 }, BinaryFieldOp { destination: Direct(3), op: Equals, lhs: Direct(0), rhs: Direct(2) }, JumpIf { condition: Direct(3), location: 8 }, Const { destination: Direct(1), bit_size: Field, value: 1 }, BinaryFieldOp { destination: Direct(0), op: Div, lhs: Direct(1), rhs: Direct(0) }, Stop { return_data: HeapVector { pointer: Direct(20), size: Direct(21) } }]" ], - "debug_symbols": "pZbLjuIwEEX/JWsWLrv84ldGIxQgtCJFAaXJSCPEv0/Z18V0L3oTNj6XmHsQxnF4dOfhuH4cxvly/ez2vx7dcRmnafw4TNdTfx+vs1x9PHedvjzcl2GQS92XeWnd+mWY791+Xqdp1/3pp7W+6fPWz5X3fpFZs+uG+SwU4WWchpKeu/9t83M1p9YlE15tv6FOZkOdLGvf5i19dtpn/2Z/0+eHVz/49/px0/olr/28ra/rb82WvqVX39KWvsvaZ36znzf1/Q/93/KqP43Lt/u1c91efjCuo69jqGOsY6pjriMZgAALoE8QEAwEBcFBIpE1pVxhDUCABRzAgAcCEAFYLCwOFicW+brOAg5gwAMBiEACcgUbABaGhWFhWBgWFksQRCABucIbgAALOIABD8DiYfGweLFEWXUDEGABBzDggQBEIAGwRFgiLBGWCEsUi5xt0QMBiEACckUyAAEWcAAsCZYES4IliUV2b8rl7JVtYxqp0Ta6Rm70jaExNqZyCAszSMZoIA1Wg9PAGryGoCFqSBrUTGomNZOaSc2k5rLLyZYQNEQNSUNuoex3BNJgNTgNrEHNVs1WzWX/U73vcgvlHkAgDVaD08AavIagIWpQs1Mzq5nVzNX8LMfOMvbHaWjP+ss6n748+u9/bzqjfw5uy/U0nNdlKMdOnZOD6B8=", + "debug_symbols": "pZXdiqNAEIXfxWsvurqr/+ZVliWYxAyCmODowhLy7lv26crOXAwM5qa/o53zBbTUe3Puj+v7YZgu14/m7de9Oc7DOA7vh/F66pbhOsnZ+6Nt9PCwzH0vp5pP+9K6dXM/Lc3btI5j2/zpxrX86OPWTYVLN8uuaZt+OgtFeBnGfkuP9n/bfF8ly7VMNj/r/ud9dtpn/2J/1/+HZz/41/rR7Oknr/28r6/X35o9fUvPvqU9fZe1z/xiP+/q+2/6v+WoOw3zlyemcXLJ2obL6ssayhrLmsqay0oGIMAC6BMEBANBQXCQSKwgF1gDEGABBzDggQBEABYLi4PFiUXGzVnAAQx4IAARSEAuYAPAwrAwLAwLw8JikbngCCQgF3gDEGABBzDgAVg8LB4WLxa5ZcEABFjAAQx4IAARSAAsEZYIS4QlwhLFEgQeCEAEEpALkgEIsIADYEmwJFgSLEksUSCWJFNjAAIs4AAGPBCACIhFnoGcC8iYSqq0la6SK31lqIyVqbL6qPqo+qj6qPqo+sosmy0EDVFD0pBr2KYagTRYDU4Da1CzVbNV8zblVJ6uXMM26QikwWpwGliD1xA0RA1qdmpmNbOauZgf28tlHrrj2Ndv6mWdTp8+scvfm+7oR/g2X0/9eZ377eVS9uR18w8=", "file_map": { "50": { "source": "fn main(mut x: i8, mut y: i8, z: i8) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(-1 as i8 < 0);\n assert(x < y);\n assert(-x < y);\n assert(-y < -x);\n assert((z > x) == false);\n assert(x <= s1);\n assert(z < x - y - s2);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_0.snap index 107be95a6e9..dd548a3c9c0 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_0.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_0.snap @@ -197,7 +197,7 @@ expression: artifact "unconstrained func 1", "[Const { destination: Direct(21), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(20), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(21), offset_address: Direct(20) }, Const { destination: Direct(2), bit_size: Field, value: 0 }, BinaryFieldOp { destination: Direct(3), op: Equals, lhs: Direct(0), rhs: Direct(2) }, JumpIf { condition: Direct(3), location: 8 }, Const { destination: Direct(1), bit_size: Field, value: 1 }, BinaryFieldOp { destination: Direct(0), op: Div, lhs: Direct(1), rhs: Direct(0) }, Stop { return_data: HeapVector { pointer: Direct(20), size: Direct(21) } }]" ], - "debug_symbols": "pZbLjuIwEEX/JWsWLrv84ldGIxQgtCJFAaXJSCPEv0/Z18V0L3oTNj6XmHsQxnF4dOfhuH4cxvly/ez2vx7dcRmnafw4TNdTfx+vs1x9PHedvjzcl2GQS92XeWnd+mWY791+Xqdp1/3pp7W+6fPWz5X3fpFZs+uG+SwU4WWchpKeu/9t83M1p9YlE15tv6FOZkOdLGvf5i19dtpn/2Z/0+eHVz/49/px0/olr/28ra/rb82WvqVX39KWvsvaZ36znzf1/Q/93/KqP43Lt/u1c91efjCuo69jqGOsY6pjriMZgAALoE8QEAwEBcFBIpE1pVxhDUCABRzAgAcCEAFYLCwOFicW+brOAg5gwAMBiEACcgUbABaGhWFhWBgWFksQRCABucIbgAALOIABD8DiYfGweLFEWXUDEGABBzDggQBEIAGwRFgiLBGWCEsUi5xt0QMBiEACckUyAAEWcAAsCZYES4IliUV2b8rl7JVtYxqp0Ta6Rm70jaExNqZyCAszSMZoIA1Wg9PAGryGoCFqSBrUTGomNZOaSc2k5rLLyZYQNEQNSUNuoex3BNJgNTgNrEHNVs1WzWX/U73vcgvlHkAgDVaD08AavIagIWpQs1Mzq5nVzNX8LMfOMvbHaWjP+ss6n748+u9/bzqjfw5uy/U0nNdlKMdOnZOD6B8=", + "debug_symbols": "pZXdiqNAEIXfxWsvurqr/+ZVliWYxAyCmODowhLy7lv26crOXAwM5qa/o53zBbTUe3Puj+v7YZgu14/m7de9Oc7DOA7vh/F66pbhOsnZ+6Nt9PCwzH0vp5pP+9K6dXM/Lc3btI5j2/zpxrX86OPWTYVLN8uuaZt+OgtFeBnGfkuP9n/bfF8ly7VMNj/r/ud9dtpn/2J/1/+HZz/41/rR7Oknr/28r6/X35o9fUvPvqU9fZe1z/xiP+/q+2/6v+WoOw3zlyemcXLJ2obL6ssayhrLmsqay0oGIMAC6BMEBANBQXCQSKwgF1gDEGABBzDggQBEABYLi4PFiUXGzVnAAQx4IAARSEAuYAPAwrAwLAwLw8JikbngCCQgF3gDEGABBzDgAVg8LB4WLxa5ZcEABFjAAQx4IAARSAAsEZYIS4QlwhLFEgQeCEAEEpALkgEIsIADYEmwJFgSLEksUSCWJFNjAAIs4AAGPBCACIhFnoGcC8iYSqq0la6SK31lqIyVqbL6qPqo+qj6qPqo+sosmy0EDVFD0pBr2KYagTRYDU4Da1CzVbNV8zblVJ6uXMM26QikwWpwGliD1xA0RA1qdmpmNbOauZgf28tlHrrj2Ndv6mWdTp8+scvfm+7oR/g2X0/9eZ377eVS9uR18w8=", "file_map": { "50": { "source": "fn main(mut x: i8, mut y: i8, z: i8) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(-1 as i8 < 0);\n assert(x < y);\n assert(-x < y);\n assert(-y < -x);\n assert((z > x) == false);\n assert(x <= s1);\n assert(z < x - y - s2);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_9223372036854775807.snap index 107be95a6e9..dd548a3c9c0 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_9223372036854775807.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_false_inliner_9223372036854775807.snap @@ -197,7 +197,7 @@ expression: artifact "unconstrained func 1", "[Const { destination: Direct(21), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(20), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(21), offset_address: Direct(20) }, Const { destination: Direct(2), bit_size: Field, value: 0 }, BinaryFieldOp { destination: Direct(3), op: Equals, lhs: Direct(0), rhs: Direct(2) }, JumpIf { condition: Direct(3), location: 8 }, Const { destination: Direct(1), bit_size: Field, value: 1 }, BinaryFieldOp { destination: Direct(0), op: Div, lhs: Direct(1), rhs: Direct(0) }, Stop { return_data: HeapVector { pointer: Direct(20), size: Direct(21) } }]" ], - "debug_symbols": "pZbLjuIwEEX/JWsWLrv84ldGIxQgtCJFAaXJSCPEv0/Z18V0L3oTNj6XmHsQxnF4dOfhuH4cxvly/ez2vx7dcRmnafw4TNdTfx+vs1x9PHedvjzcl2GQS92XeWnd+mWY791+Xqdp1/3pp7W+6fPWz5X3fpFZs+uG+SwU4WWchpKeu/9t83M1p9YlE15tv6FOZkOdLGvf5i19dtpn/2Z/0+eHVz/49/px0/olr/28ra/rb82WvqVX39KWvsvaZ36znzf1/Q/93/KqP43Lt/u1c91efjCuo69jqGOsY6pjriMZgAALoE8QEAwEBcFBIpE1pVxhDUCABRzAgAcCEAFYLCwOFicW+brOAg5gwAMBiEACcgUbABaGhWFhWBgWFksQRCABucIbgAALOIABD8DiYfGweLFEWXUDEGABBzDggQBEIAGwRFgiLBGWCEsUi5xt0QMBiEACckUyAAEWcAAsCZYES4IliUV2b8rl7JVtYxqp0Ta6Rm70jaExNqZyCAszSMZoIA1Wg9PAGryGoCFqSBrUTGomNZOaSc2k5rLLyZYQNEQNSUNuoex3BNJgNTgNrEHNVs1WzWX/U73vcgvlHkAgDVaD08AavIagIWpQs1Mzq5nVzNX8LMfOMvbHaWjP+ss6n748+u9/bzqjfw5uy/U0nNdlKMdOnZOD6B8=", + "debug_symbols": "pZXdiqNAEIXfxWsvurqr/+ZVliWYxAyCmODowhLy7lv26crOXAwM5qa/o53zBbTUe3Puj+v7YZgu14/m7de9Oc7DOA7vh/F66pbhOsnZ+6Nt9PCwzH0vp5pP+9K6dXM/Lc3btI5j2/zpxrX86OPWTYVLN8uuaZt+OgtFeBnGfkuP9n/bfF8ly7VMNj/r/ud9dtpn/2J/1/+HZz/41/rR7Oknr/28r6/X35o9fUvPvqU9fZe1z/xiP+/q+2/6v+WoOw3zlyemcXLJ2obL6ssayhrLmsqay0oGIMAC6BMEBANBQXCQSKwgF1gDEGABBzDggQBEABYLi4PFiUXGzVnAAQx4IAARSEAuYAPAwrAwLAwLw8JikbngCCQgF3gDEGABBzDgAVg8LB4WLxa5ZcEABFjAAQx4IAARSAAsEZYIS4QlwhLFEgQeCEAEEpALkgEIsIADYEmwJFgSLEksUSCWJFNjAAIs4AAGPBCACIhFnoGcC8iYSqq0la6SK31lqIyVqbL6qPqo+qj6qPqo+sosmy0EDVFD0pBr2KYagTRYDU4Da1CzVbNV8zblVJ6uXMM26QikwWpwGliD1xA0RA1qdmpmNbOauZgf28tlHrrj2Ndv6mWdTp8+scvfm+7oR/g2X0/9eZ377eVS9uR18w8=", "file_map": { "50": { "source": "fn main(mut x: i8, mut y: i8, z: i8) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(-1 as i8 < 0);\n assert(x < y);\n assert(-x < y);\n assert(-y < -x);\n assert((z > x) == false);\n assert(x <= s1);\n assert(z < x - y - s2);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap index 18bbacdff8c..86183e6ebb6 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap @@ -55,9 +55,9 @@ expression: artifact "return value indices : []", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 })], outputs: []", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U8) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U8) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 121 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 255 }, Cast { destination: Relative(5), source: Relative(4), bit_size: Integer(U8) }, Const { destination: Relative(4), bit_size: Integer(U8), value: 0 }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(5), rhs: Relative(9) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(7), rhs: Relative(8) }, Const { destination: Relative(5), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(6), location: 30 }, Const { destination: Relative(7), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(7) } }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(9) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(7), rhs: Relative(8) }, JumpIf { condition: Relative(6), location: 37 }, Const { destination: Relative(7), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(7) } }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(7), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(7), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(1), bit_size: Integer(U8) }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(10), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 49 }, Call { location: 127 }, Const { destination: Relative(12), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(12) }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(12) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(11) }, JumpIf { condition: Relative(6), location: 56 }, Const { destination: Relative(8), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(8) } }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(4), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(4), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(2), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(11), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 67 }, Call { location: 127 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(13) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, JumpIf { condition: Relative(6), location: 74 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Const { destination: Relative(11), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(11) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(11) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(7) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 0 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(7), location: 83 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(4), bit_size: Integer(U8), value: 5 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(13) }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, JumpIf { condition: Relative(4), location: 92 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 102 }, Call { location: 127 }, Const { destination: Relative(2), bit_size: Integer(U8), value: 8 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, Not { destination: Relative(4), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 113 }, Call { location: 127 }, Const { destination: Relative(7), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(7) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(7) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U8, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(2), location: 120 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(1) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 126 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U8) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U8) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 112 }, Const { destination: Relative(7), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(5), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(7) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(7) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U8, lhs: Relative(5), rhs: Relative(6) }, Const { destination: Relative(5), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(4), location: 27 }, Const { destination: Relative(6), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(6) } }, Const { destination: Relative(4), bit_size: Integer(U8), value: 0 }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(7), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(7), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(1), bit_size: Integer(U8) }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(10), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 40 }, Call { location: 118 }, Const { destination: Relative(12), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(12) }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(12) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(11) }, JumpIf { condition: Relative(6), location: 47 }, Const { destination: Relative(8), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(8) } }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(4), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(4), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(2), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(11), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 58 }, Call { location: 118 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(13) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, JumpIf { condition: Relative(6), location: 65 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Const { destination: Relative(11), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(11) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(11) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(7) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 0 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(7), location: 74 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(4), bit_size: Integer(U8), value: 5 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(13) }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, JumpIf { condition: Relative(4), location: 83 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 93 }, Call { location: 118 }, Const { destination: Relative(2), bit_size: Integer(U8), value: 8 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, Not { destination: Relative(4), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 104 }, Call { location: 118 }, Const { destination: Relative(7), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(7) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(7) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U8, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(2), location: 111 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(1) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 117 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "pdXNjqpAFATgd+k1iz79377KxBhUnJAQNIzc5Mbw7nOa6uM4i9ngxq8Qq0yIyEOdu+P8eejHy/VL7T4e6jj1w9B/Hobrqb3315HffShdXiirHTXKaEBqZxgDLHDAgwAiSCCvWF6xDAEDLHDAgwB4xTEJ5BWnAQEDLHDAgwCw4rDieMU3ymtAwAALHPCAVwITQQJ5JWhAwAALHPAAK4FXIpNAXokaEDDAAl5JjAcBRMArmckrSQMCBvAKadZVfTVUYzVVM8y6SlWeI/4FZFt1VV8N1VhN1QxJawkkoUyaEqwEJ8FLCBKihCQh10BaAkmQZSrLtgQnwUsIEqKEJKEs22VplNwPh/vUdeV2eLlB+La5tVM33tVunIehUf/aYV4/9HVrx9V7O/FZvnrdeGZ58NIPXUlL89PWf1dzql2+EM+231AnvaFOxknf5C19Z6Xv/Jv9Td8fnv3g3+vHTdcveennbX25/kZv6Rt69g1t6dssfefe7OdNff9Hf89H7amffj2wlrI09e1x6OrhZR5PL2fv/29yRh54t+l66s7z1JWll6cev36QoYZM2Jd/hPUw8mHeL+XrvwE=", + "debug_symbols": "pdXNboJAFAXgd5k1i7l3/n2VxhhUbEgIGgpNGsO79w6HsXbRpMEN38XxHIyOcFfn5ji9H9r+cv1Qu7e7Og5t17Xvh+56qsf22surd6XzgZLaUaVYAwIMDLDAAQ+C2rEQQVowGhBgYIAFDniAFoMWgxYrLUYgwMAACxzwQFqsEEFacBoQYGCABQ54gBYnLU5IC14DAgwMsEBavOBBABFIS6hU0IAAAwOkJQoOeBBABGkhakCAgbQkwQIHPAgggrSQNCDAIP/SWrSrbtWvhtW4miBpXQYqA5fBlCGXUh5cGXwZQhliGdI6UG6mea5U2bSHcWiavGefdrHs7Vs9NP2odv3UdZX6rLtpedPHre4Xx3qQVfkgTX8WpfDSdk2e5uonrf+OEts1TJwecff/vDUlb92L+U3X94+8d6/lg96Sj67k07Z8+f5Zb8kzPfJMW/Imlby1L+bTprz7I7+Xs/rUDr/u63NuGtr62DXr6WXqT0+r49etrJTnwm24nprzNDS56enhIMc3Iq6Iwj7/J5fTWBHr/Zwv/w0=", "file_map": { "50": { "source": "fn main(mut x: i8, mut y: i8, z: i8) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(-1 as i8 < 0);\n assert(x < y);\n assert(-x < y);\n assert(-y < -x);\n assert((z > x) == false);\n assert(x <= s1);\n assert(z < x - y - s2);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_0.snap index 18bbacdff8c..86183e6ebb6 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_0.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_0.snap @@ -55,9 +55,9 @@ expression: artifact "return value indices : []", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 })], outputs: []", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U8) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U8) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 121 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 255 }, Cast { destination: Relative(5), source: Relative(4), bit_size: Integer(U8) }, Const { destination: Relative(4), bit_size: Integer(U8), value: 0 }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(5), rhs: Relative(9) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(7), rhs: Relative(8) }, Const { destination: Relative(5), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(6), location: 30 }, Const { destination: Relative(7), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(7) } }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(9) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(7), rhs: Relative(8) }, JumpIf { condition: Relative(6), location: 37 }, Const { destination: Relative(7), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(7) } }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(7), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(7), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(1), bit_size: Integer(U8) }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(10), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 49 }, Call { location: 127 }, Const { destination: Relative(12), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(12) }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(12) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(11) }, JumpIf { condition: Relative(6), location: 56 }, Const { destination: Relative(8), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(8) } }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(4), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(4), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(2), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(11), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 67 }, Call { location: 127 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(13) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, JumpIf { condition: Relative(6), location: 74 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Const { destination: Relative(11), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(11) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(11) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(7) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 0 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(7), location: 83 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(4), bit_size: Integer(U8), value: 5 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(13) }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, JumpIf { condition: Relative(4), location: 92 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 102 }, Call { location: 127 }, Const { destination: Relative(2), bit_size: Integer(U8), value: 8 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, Not { destination: Relative(4), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 113 }, Call { location: 127 }, Const { destination: Relative(7), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(7) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(7) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U8, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(2), location: 120 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(1) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 126 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U8) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U8) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 112 }, Const { destination: Relative(7), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(5), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(7) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(7) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U8, lhs: Relative(5), rhs: Relative(6) }, Const { destination: Relative(5), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(4), location: 27 }, Const { destination: Relative(6), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(6) } }, Const { destination: Relative(4), bit_size: Integer(U8), value: 0 }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(7), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(7), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(1), bit_size: Integer(U8) }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(10), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 40 }, Call { location: 118 }, Const { destination: Relative(12), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(12) }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(12) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(11) }, JumpIf { condition: Relative(6), location: 47 }, Const { destination: Relative(8), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(8) } }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(4), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(4), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(2), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(11), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 58 }, Call { location: 118 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(13) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, JumpIf { condition: Relative(6), location: 65 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Const { destination: Relative(11), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(11) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(11) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(7) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 0 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(7), location: 74 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(4), bit_size: Integer(U8), value: 5 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(13) }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, JumpIf { condition: Relative(4), location: 83 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 93 }, Call { location: 118 }, Const { destination: Relative(2), bit_size: Integer(U8), value: 8 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, Not { destination: Relative(4), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 104 }, Call { location: 118 }, Const { destination: Relative(7), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(7) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(7) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U8, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(2), location: 111 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(1) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 117 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "pdXNjqpAFATgd+k1iz79377KxBhUnJAQNIzc5Mbw7nOa6uM4i9ngxq8Qq0yIyEOdu+P8eejHy/VL7T4e6jj1w9B/Hobrqb3315HffShdXiirHTXKaEBqZxgDLHDAgwAiSCCvWF6xDAEDLHDAgwB4xTEJ5BWnAQEDLHDAgwCw4rDieMU3ymtAwAALHPCAVwITQQJ5JWhAwAALHPAAK4FXIpNAXokaEDDAAl5JjAcBRMArmckrSQMCBvAKadZVfTVUYzVVM8y6SlWeI/4FZFt1VV8N1VhN1QxJawkkoUyaEqwEJ8FLCBKihCQh10BaAkmQZSrLtgQnwUsIEqKEJKEs22VplNwPh/vUdeV2eLlB+La5tVM33tVunIehUf/aYV4/9HVrx9V7O/FZvnrdeGZ58NIPXUlL89PWf1dzql2+EM+231AnvaFOxknf5C19Z6Xv/Jv9Td8fnv3g3+vHTdcveennbX25/kZv6Rt69g1t6dssfefe7OdNff9Hf89H7amffj2wlrI09e1x6OrhZR5PL2fv/29yRh54t+l66s7z1JWll6cev36QoYZM2Jd/hPUw8mHeL+XrvwE=", + "debug_symbols": "pdXNboJAFAXgd5k1i7l3/n2VxhhUbEgIGgpNGsO79w6HsXbRpMEN38XxHIyOcFfn5ji9H9r+cv1Qu7e7Og5t17Xvh+56qsf22surd6XzgZLaUaVYAwIMDLDAAQ+C2rEQQVowGhBgYIAFDniAFoMWgxYrLUYgwMAACxzwQFqsEEFacBoQYGCABQ54gBYnLU5IC14DAgwMsEBavOBBABFIS6hU0IAAAwOkJQoOeBBABGkhakCAgbQkwQIHPAgggrSQNCDAIP/SWrSrbtWvhtW4miBpXQYqA5fBlCGXUh5cGXwZQhliGdI6UG6mea5U2bSHcWiavGefdrHs7Vs9NP2odv3UdZX6rLtpedPHre4Xx3qQVfkgTX8WpfDSdk2e5uonrf+OEts1TJwecff/vDUlb92L+U3X94+8d6/lg96Sj67k07Z8+f5Zb8kzPfJMW/Imlby1L+bTprz7I7+Xs/rUDr/u63NuGtr62DXr6WXqT0+r49etrJTnwm24nprzNDS56enhIMc3Iq6Iwj7/J5fTWBHr/Zwv/w0=", "file_map": { "50": { "source": "fn main(mut x: i8, mut y: i8, z: i8) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(-1 as i8 < 0);\n assert(x < y);\n assert(-x < y);\n assert(-y < -x);\n assert((z > x) == false);\n assert(x <= s1);\n assert(z < x - y - s2);\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_9223372036854775807.snap index 18bbacdff8c..86183e6ebb6 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_9223372036854775807.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/signed_comparison/execute__tests__force_brillig_true_inliner_9223372036854775807.snap @@ -55,9 +55,9 @@ expression: artifact "return value indices : []", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 })], outputs: []", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U8) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U8) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 121 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 255 }, Cast { destination: Relative(5), source: Relative(4), bit_size: Integer(U8) }, Const { destination: Relative(4), bit_size: Integer(U8), value: 0 }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(5), rhs: Relative(9) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(7), rhs: Relative(8) }, Const { destination: Relative(5), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(6), location: 30 }, Const { destination: Relative(7), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(7) } }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(9) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(7), rhs: Relative(8) }, JumpIf { condition: Relative(6), location: 37 }, Const { destination: Relative(7), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(7) } }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(7), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(7), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(1), bit_size: Integer(U8) }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(10), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 49 }, Call { location: 127 }, Const { destination: Relative(12), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(12) }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(12) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(11) }, JumpIf { condition: Relative(6), location: 56 }, Const { destination: Relative(8), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(8) } }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(4), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(4), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(2), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(11), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 67 }, Call { location: 127 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(13) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, JumpIf { condition: Relative(6), location: 74 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Const { destination: Relative(11), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(11) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(11) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(7) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 0 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(7), location: 83 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(4), bit_size: Integer(U8), value: 5 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(13) }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, JumpIf { condition: Relative(4), location: 92 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 102 }, Call { location: 127 }, Const { destination: Relative(2), bit_size: Integer(U8), value: 8 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, Not { destination: Relative(4), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 113 }, Call { location: 127 }, Const { destination: Relative(7), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(7) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(7) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U8, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(2), location: 120 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(1) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 126 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(4), offset_address: Relative(5) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U8) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U8) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Mov { destination: Relative(2), source: Direct(32837) }, Mov { destination: Relative(3), source: Direct(32838) }, Call { location: 17 }, Call { location: 18 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 112 }, Const { destination: Relative(7), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(5), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(7) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(7) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U8, lhs: Relative(5), rhs: Relative(6) }, Const { destination: Relative(5), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(4), location: 27 }, Const { destination: Relative(6), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(6) } }, Const { destination: Relative(4), bit_size: Integer(U8), value: 0 }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(1) }, Mov { destination: Relative(7), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(7), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(1), bit_size: Integer(U8) }, Const { destination: Relative(9), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(10), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(10), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 40 }, Call { location: 118 }, Const { destination: Relative(12), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(12) }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(2), rhs: Relative(12) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(11) }, JumpIf { condition: Relative(6), location: 47 }, Const { destination: Relative(8), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(8) } }, BinaryIntOp { destination: Relative(6), op: Sub, bit_size: U8, lhs: Relative(4), rhs: Relative(2) }, Mov { destination: Relative(4), source: Relative(6) }, Cast { destination: Relative(6), source: Relative(4), bit_size: Integer(U8) }, Cast { destination: Relative(8), source: Relative(2), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(8), rhs: Relative(9) }, Not { destination: Relative(8), source: Relative(11), bit_size: U1 }, BinaryIntOp { destination: Relative(11), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(9) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(11), rhs: Relative(8) }, BinaryIntOp { destination: Relative(11), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(8) }, JumpIf { condition: Relative(11), location: 58 }, Call { location: 118 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(7), rhs: Relative(13) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, JumpIf { condition: Relative(6), location: 65 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Const { destination: Relative(11), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(11) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(11) }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U8, lhs: Relative(6), rhs: Relative(7) }, Const { destination: Relative(6), bit_size: Integer(U1), value: 0 }, BinaryIntOp { destination: Relative(7), op: Equals, bit_size: U1, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(7), location: 74 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, Const { destination: Relative(4), bit_size: Integer(U8), value: 5 }, Const { destination: Relative(13), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(11), op: Add, bit_size: U8, lhs: Relative(4), rhs: Relative(13) }, BinaryIntOp { destination: Relative(12), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(13) }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(11), rhs: Relative(12) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, JumpIf { condition: Relative(4), location: 83 }, Const { destination: Relative(11), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(11) } }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U1, lhs: Relative(10), rhs: Relative(8) }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(10) }, BinaryIntOp { destination: Relative(7), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 93 }, Call { location: 118 }, Const { destination: Relative(2), bit_size: Integer(U8), value: 8 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U8, lhs: Relative(1), rhs: Relative(2) }, Mov { destination: Relative(1), source: Relative(4) }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U8) }, Not { destination: Relative(4), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(7), op: LessThan, bit_size: U8, lhs: Relative(2), rhs: Relative(9) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(7), rhs: Relative(6) }, BinaryIntOp { destination: Relative(6), op: Mul, bit_size: U1, lhs: Relative(2), rhs: Relative(4) }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U1, lhs: Relative(6), rhs: Relative(4) }, JumpIf { condition: Relative(2), location: 104 }, Call { location: 118 }, Const { destination: Relative(7), bit_size: Integer(U8), value: 128 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U8, lhs: Relative(3), rhs: Relative(7) }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U8, lhs: Relative(1), rhs: Relative(7) }, BinaryIntOp { destination: Relative(2), op: LessThan, bit_size: U8, lhs: Relative(4), rhs: Relative(6) }, JumpIf { condition: Relative(2), location: 111 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(1) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 117 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "pdXNjqpAFATgd+k1iz79377KxBhUnJAQNIzc5Mbw7nOa6uM4i9ngxq8Qq0yIyEOdu+P8eejHy/VL7T4e6jj1w9B/Hobrqb3315HffShdXiirHTXKaEBqZxgDLHDAgwAiSCCvWF6xDAEDLHDAgwB4xTEJ5BWnAQEDLHDAgwCw4rDieMU3ymtAwAALHPCAVwITQQJ5JWhAwAALHPAAK4FXIpNAXokaEDDAAl5JjAcBRMArmckrSQMCBvAKadZVfTVUYzVVM8y6SlWeI/4FZFt1VV8N1VhN1QxJawkkoUyaEqwEJ8FLCBKihCQh10BaAkmQZSrLtgQnwUsIEqKEJKEs22VplNwPh/vUdeV2eLlB+La5tVM33tVunIehUf/aYV4/9HVrx9V7O/FZvnrdeGZ58NIPXUlL89PWf1dzql2+EM+231AnvaFOxknf5C19Z6Xv/Jv9Td8fnv3g3+vHTdcveennbX25/kZv6Rt69g1t6dssfefe7OdNff9Hf89H7amffj2wlrI09e1x6OrhZR5PL2fv/29yRh54t+l66s7z1JWll6cev36QoYZM2Jd/hPUw8mHeL+XrvwE=", + "debug_symbols": "pdXNboJAFAXgd5k1i7l3/n2VxhhUbEgIGgpNGsO79w6HsXbRpMEN38XxHIyOcFfn5ji9H9r+cv1Qu7e7Og5t17Xvh+56qsf22surd6XzgZLaUaVYAwIMDLDAAQ+C2rEQQVowGhBgYIAFDniAFoMWgxYrLUYgwMAACxzwQFqsEEFacBoQYGCABQ54gBYnLU5IC14DAgwMsEBavOBBABFIS6hU0IAAAwOkJQoOeBBABGkhakCAgbQkwQIHPAgggrSQNCDAIP/SWrSrbtWvhtW4miBpXQYqA5fBlCGXUh5cGXwZQhliGdI6UG6mea5U2bSHcWiavGefdrHs7Vs9NP2odv3UdZX6rLtpedPHre4Xx3qQVfkgTX8WpfDSdk2e5uonrf+OEts1TJwecff/vDUlb92L+U3X94+8d6/lg96Sj67k07Z8+f5Zb8kzPfJMW/Imlby1L+bTprz7I7+Xs/rUDr/u63NuGtr62DXr6WXqT0+r49etrJTnwm24nprzNDS56enhIMc3Iq6Iwj7/J5fTWBHr/Zwv/w0=", "file_map": { "50": { "source": "fn main(mut x: i8, mut y: i8, z: i8) {\n let mut s1: i8 = 5;\n let mut s2: i8 = 8;\n assert(-1 as i8 < 0);\n assert(x < y);\n assert(-x < y);\n assert(-y < -x);\n assert((z > x) == false);\n assert(x <= s1);\n assert(z < x - y - s2);\n}\n", From a7fa74913ff02d0adb56aa6da6a538730968dec2 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Tue, 10 Jun 2025 15:24:21 +0000 Subject: [PATCH 03/10] do not simplify OOB value --- .../src/ssa/ir/dfg/simplify/cast.rs | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs b/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs index e685b923ec3..7b6aae17b26 100644 --- a/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs +++ b/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs @@ -55,13 +55,14 @@ pub(super) fn simplify_cast( NumericType::NativeField | NumericType::Unsigned { .. } | NumericType::Signed { .. }, - NumericType::Signed { .. }, + NumericType::Signed { bit_size }, ) => { // Field/Unsigned -> signed - // We could only simplify to signed when we are below the maximum integer of the destination type. - // However, we expect that overflow constraints have been generated appropriately that enforce correctness. + // We only simplify to signed when we are below the maximum integer of the destination type. + let integer_modulus = BigUint::from(2u128).pow(bit_size); + let constant_uint: BigUint = BigUint::from_bytes_be(&constant.to_be_bytes()); let integer_constant = IntegerConstant::from_numeric_constant(constant, dst_typ); - if integer_constant.is_some() { + if constant_uint < integer_modulus && integer_constant.is_some() { SimplifiedTo(dfg.make_constant(constant, dst_typ)) } else { None @@ -77,7 +78,10 @@ pub(super) fn simplify_cast( #[cfg(test)] mod tests { - use crate::{assert_ssa_snapshot, ssa::ssa_gen::Ssa}; + use crate::{ + assert_ssa_snapshot, + ssa::{opt::assert_normalized_ssa_equals, ssa_gen::Ssa}, + }; #[test] fn unsigned_u8_to_i8_safe() { @@ -116,14 +120,6 @@ mod tests { } "; let ssa = Ssa::from_str_simplifying(src).unwrap(); - - // The overflow check would fail here. - assert_ssa_snapshot!(ssa, @r" - brillig(inline) predicate_pure fn main f0 { - b0(): - constrain u1 1 == u1 0 - return i8 44 - } - "); + assert_normalized_ssa_equals(ssa, src); } } From dfe07e4c4a7d61208c733e89cb2424a15a4c0bb5 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Tue, 10 Jun 2025 15:43:49 +0000 Subject: [PATCH 04/10] gate against casts to i128 --- .../src/ssa/ir/dfg/simplify/cast.rs | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs b/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs index 7b6aae17b26..237f9aec46a 100644 --- a/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs +++ b/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs @@ -57,12 +57,16 @@ pub(super) fn simplify_cast( | NumericType::Signed { .. }, NumericType::Signed { bit_size }, ) => { + // `IntegerConstant::from_numeric_constant` cannot handle i128 + if bit_size == 128 { + return None; + } // Field/Unsigned -> signed + // We could only simplify to signed when we are below the maximum integer of the destination type. + // However, we expect that overflow constraints have been generated appropriately that enforce correctness. // We only simplify to signed when we are below the maximum integer of the destination type. - let integer_modulus = BigUint::from(2u128).pow(bit_size); - let constant_uint: BigUint = BigUint::from_bytes_be(&constant.to_be_bytes()); let integer_constant = IntegerConstant::from_numeric_constant(constant, dst_typ); - if constant_uint < integer_modulus && integer_constant.is_some() { + if integer_constant.is_some() { SimplifiedTo(dfg.make_constant(constant, dst_typ)) } else { None @@ -78,10 +82,7 @@ pub(super) fn simplify_cast( #[cfg(test)] mod tests { - use crate::{ - assert_ssa_snapshot, - ssa::{opt::assert_normalized_ssa_equals, ssa_gen::Ssa}, - }; + use crate::{assert_ssa_snapshot, ssa::ssa_gen::Ssa}; #[test] fn unsigned_u8_to_i8_safe() { @@ -120,6 +121,14 @@ mod tests { } "; let ssa = Ssa::from_str_simplifying(src).unwrap(); - assert_normalized_ssa_equals(ssa, src); + + // The overflow check would fail here. + assert_ssa_snapshot!(ssa, @r" + brillig(inline) predicate_pure fn main f0 { + b0(): + constrain u1 1 == u1 0 + return i8 44 + } + "); } } From 32c1f9b4757efa57470e9fc474c4621ee19f7543 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Tue, 10 Jun 2025 16:12:17 +0000 Subject: [PATCH 05/10] cleanup comment and snaps --- compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs | 1 - ...sts__force_brillig_false_inliner_-9223372036854775808.snap | 2 +- .../execute__tests__force_brillig_false_inliner_0.snap | 2 +- ...ests__force_brillig_false_inliner_9223372036854775807.snap | 2 +- ...ests__force_brillig_true_inliner_-9223372036854775808.snap | 4 ++-- .../execute__tests__force_brillig_true_inliner_0.snap | 4 ++-- ...tests__force_brillig_true_inliner_9223372036854775807.snap | 4 ++-- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs b/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs index 237f9aec46a..deb6250a21e 100644 --- a/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs +++ b/compiler/noirc_evaluator/src/ssa/ir/dfg/simplify/cast.rs @@ -64,7 +64,6 @@ pub(super) fn simplify_cast( // Field/Unsigned -> signed // We could only simplify to signed when we are below the maximum integer of the destination type. // However, we expect that overflow constraints have been generated appropriately that enforce correctness. - // We only simplify to signed when we are below the maximum integer of the destination type. let integer_constant = IntegerConstant::from_numeric_constant(constant, dst_typ); if integer_constant.is_some() { SimplifiedTo(dfg.make_constant(constant, dst_typ)) diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap index 7102a8f7925..2155e945e66 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap @@ -48,7 +48,7 @@ expression: artifact "unconstrained func 0", "[Const { destination: Direct(10), bit_size: Integer(U32), value: 2 }, Const { destination: Direct(11), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(10), offset_address: Direct(11) }, BinaryFieldOp { destination: Direct(2), op: IntegerDiv, lhs: Direct(0), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Mul, lhs: Direct(2), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Sub, lhs: Direct(0), rhs: Direct(1) }, Mov { destination: Direct(0), source: Direct(2) }, Stop { return_data: HeapVector { pointer: Direct(11), size: Direct(10) } }]" ], - "debug_symbols": "pdNBjoMgFAbgu7B2ISiKXmUyMajYkBA0FJpMTO8+z1eYaRckjd38CM9PUHAnsxrDZdB2Wa+k/9rJ6LQx+jKYdZJerxZG93tBUnfwTikYIk91UJt0ynrS22BMQW7SBLzpukmLrZcOqmVBlJ2hhQcu2qjj6l786zJPRbJC/GH+tqaMR05Z1rO8r7sqel7WZ+avujR/zU6tv/7M8zb5psz5Ju+ZaKJn3an358nT9tV/Q09O2r2cN1KSHj44xWSYFWaNyTEbzBZTYHYPFfFDU+Cw9xT8sfE36bQcjYqnegl2ejrk/mdLlfQbbG6d1BycOhaINVjyLw==", + "debug_symbols": "ndLBboQgEAbgd+HsQVhQ9FWaxqDihoSgYaFJY3z3jrPQ7h5IGi+/wvjJhMxOZj3G+2Dcsj5I/7GT0RtrzX2w66SCWR3s7kdF8nIIXmvYIi91UJvy2gXSu2htRb6UjfjRY1MOn0F5qNYV0W6GJ/xwMVafb0f1p+syldlK+YvFvzVlInHKip6VPe9uyYuaXzqf5/M5u+JFm31Tl7woeyab5Fl3qX+RPW3f/Ses1GT827yQmvRwYRSTYd4wOabAbDBbTInZPVXCT02Bw91R8O1xNuiNGq1OU7lEN70MafjeciWP8ebXSc/R67NBrEHLPw==", "file_map": { "50": { "source": "use std::ops::{Neg, Not};\n\n// x = 3\nfn main(x: u32) {\n let wx = Wrapper::new(x as i32);\n let ex: i32 = 3;\n\n assert((-wx).inner == -ex);\n assert((!wx).inner == !ex);\n\n // Check that it works with type variables (x's type isn't immediately known)\n let x = 3;\n assert(-3 == -x);\n}\n\nstruct Wrapper {\n inner: i32,\n}\n\nimpl Wrapper {\n fn new(inner: i32) -> Self {\n Wrapper { inner }\n }\n}\n\nimpl Neg for Wrapper {\n fn neg(self) -> Wrapper {\n Wrapper::new(-self.inner)\n }\n}\n\nimpl Not for Wrapper {\n fn not(self) -> Wrapper {\n Wrapper::new(!self.inner)\n }\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_0.snap index 7102a8f7925..2155e945e66 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_0.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_0.snap @@ -48,7 +48,7 @@ expression: artifact "unconstrained func 0", "[Const { destination: Direct(10), bit_size: Integer(U32), value: 2 }, Const { destination: Direct(11), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(10), offset_address: Direct(11) }, BinaryFieldOp { destination: Direct(2), op: IntegerDiv, lhs: Direct(0), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Mul, lhs: Direct(2), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Sub, lhs: Direct(0), rhs: Direct(1) }, Mov { destination: Direct(0), source: Direct(2) }, Stop { return_data: HeapVector { pointer: Direct(11), size: Direct(10) } }]" ], - "debug_symbols": "pdNBjoMgFAbgu7B2ISiKXmUyMajYkBA0FJpMTO8+z1eYaRckjd38CM9PUHAnsxrDZdB2Wa+k/9rJ6LQx+jKYdZJerxZG93tBUnfwTikYIk91UJt0ynrS22BMQW7SBLzpukmLrZcOqmVBlJ2hhQcu2qjj6l786zJPRbJC/GH+tqaMR05Z1rO8r7sqel7WZ+avujR/zU6tv/7M8zb5psz5Ju+ZaKJn3an358nT9tV/Q09O2r2cN1KSHj44xWSYFWaNyTEbzBZTYHYPFfFDU+Cw9xT8sfE36bQcjYqnegl2ejrk/mdLlfQbbG6d1BycOhaINVjyLw==", + "debug_symbols": "ndLBboQgEAbgd+HsQVhQ9FWaxqDihoSgYaFJY3z3jrPQ7h5IGi+/wvjJhMxOZj3G+2Dcsj5I/7GT0RtrzX2w66SCWR3s7kdF8nIIXmvYIi91UJvy2gXSu2htRb6UjfjRY1MOn0F5qNYV0W6GJ/xwMVafb0f1p+syldlK+YvFvzVlInHKip6VPe9uyYuaXzqf5/M5u+JFm31Tl7woeyab5Fl3qX+RPW3f/Ses1GT827yQmvRwYRSTYd4wOabAbDBbTInZPVXCT02Bw91R8O1xNuiNGq1OU7lEN70MafjeciWP8ebXSc/R67NBrEHLPw==", "file_map": { "50": { "source": "use std::ops::{Neg, Not};\n\n// x = 3\nfn main(x: u32) {\n let wx = Wrapper::new(x as i32);\n let ex: i32 = 3;\n\n assert((-wx).inner == -ex);\n assert((!wx).inner == !ex);\n\n // Check that it works with type variables (x's type isn't immediately known)\n let x = 3;\n assert(-3 == -x);\n}\n\nstruct Wrapper {\n inner: i32,\n}\n\nimpl Wrapper {\n fn new(inner: i32) -> Self {\n Wrapper { inner }\n }\n}\n\nimpl Neg for Wrapper {\n fn neg(self) -> Wrapper {\n Wrapper::new(-self.inner)\n }\n}\n\nimpl Not for Wrapper {\n fn not(self) -> Wrapper {\n Wrapper::new(!self.inner)\n }\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_9223372036854775807.snap index 7102a8f7925..2155e945e66 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_9223372036854775807.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_false_inliner_9223372036854775807.snap @@ -48,7 +48,7 @@ expression: artifact "unconstrained func 0", "[Const { destination: Direct(10), bit_size: Integer(U32), value: 2 }, Const { destination: Direct(11), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(10), offset_address: Direct(11) }, BinaryFieldOp { destination: Direct(2), op: IntegerDiv, lhs: Direct(0), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Mul, lhs: Direct(2), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Sub, lhs: Direct(0), rhs: Direct(1) }, Mov { destination: Direct(0), source: Direct(2) }, Stop { return_data: HeapVector { pointer: Direct(11), size: Direct(10) } }]" ], - "debug_symbols": "pdNBjoMgFAbgu7B2ISiKXmUyMajYkBA0FJpMTO8+z1eYaRckjd38CM9PUHAnsxrDZdB2Wa+k/9rJ6LQx+jKYdZJerxZG93tBUnfwTikYIk91UJt0ynrS22BMQW7SBLzpukmLrZcOqmVBlJ2hhQcu2qjj6l786zJPRbJC/GH+tqaMR05Z1rO8r7sqel7WZ+avujR/zU6tv/7M8zb5psz5Ju+ZaKJn3an358nT9tV/Q09O2r2cN1KSHj44xWSYFWaNyTEbzBZTYHYPFfFDU+Cw9xT8sfE36bQcjYqnegl2ejrk/mdLlfQbbG6d1BycOhaINVjyLw==", + "debug_symbols": "ndLBboQgEAbgd+HsQVhQ9FWaxqDihoSgYaFJY3z3jrPQ7h5IGi+/wvjJhMxOZj3G+2Dcsj5I/7GT0RtrzX2w66SCWR3s7kdF8nIIXmvYIi91UJvy2gXSu2htRb6UjfjRY1MOn0F5qNYV0W6GJ/xwMVafb0f1p+syldlK+YvFvzVlInHKip6VPe9uyYuaXzqf5/M5u+JFm31Tl7woeyab5Fl3qX+RPW3f/Ses1GT827yQmvRwYRSTYd4wOabAbDBbTInZPVXCT02Bw91R8O1xNuiNGq1OU7lEN70MafjeciWP8ebXSc/R67NBrEHLPw==", "file_map": { "50": { "source": "use std::ops::{Neg, Not};\n\n// x = 3\nfn main(x: u32) {\n let wx = Wrapper::new(x as i32);\n let ex: i32 = 3;\n\n assert((-wx).inner == -ex);\n assert((!wx).inner == !ex);\n\n // Check that it works with type variables (x's type isn't immediately known)\n let x = 3;\n assert(-3 == -x);\n}\n\nstruct Wrapper {\n inner: i32,\n}\n\nimpl Wrapper {\n fn new(inner: i32) -> Self {\n Wrapper { inner }\n }\n}\n\nimpl Neg for Wrapper {\n fn neg(self) -> Wrapper {\n Wrapper::new(-self.inner)\n }\n}\n\nimpl Not for Wrapper {\n fn not(self) -> Wrapper {\n Wrapper::new(!self.inner)\n }\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap index eb0eee6b92c..5affc60b8e8 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap @@ -37,9 +37,9 @@ expression: artifact "return value indices : []", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 })], outputs: []", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 13 }, Call { location: 14 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 37 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4 }, Mov { destination: Relative(4), source: Direct(0) }, Mov { destination: Relative(5), source: Relative(2) }, BinaryIntOp { destination: Direct(0), op: Add, bit_size: U32, lhs: Direct(0), rhs: Relative(3) }, Call { location: 43 }, Mov { destination: Direct(0), source: Relative(0) }, Mov { destination: Relative(1), source: Relative(5) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967293 }, Cast { destination: Relative(4), source: Relative(3), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U32, lhs: Relative(1), rhs: Relative(4) }, JumpIf { condition: Relative(3), location: 29 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(5) } }, Not { destination: Relative(1), source: Relative(2), bit_size: U32 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 3 }, Not { destination: Relative(3), source: Relative(2), bit_size: U32 }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U32, lhs: Relative(1), rhs: Relative(3) }, JumpIf { condition: Relative(2), location: 36 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 42 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, Call { location: 37 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(2), rhs: Relative(1) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, Cast { destination: Relative(4), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(1), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(1) }, Not { destination: Relative(4), source: Relative(5), bit_size: U1 }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(1) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(1), rhs: Relative(4) }, JumpIf { condition: Relative(3), location: 57 }, Call { location: 59 }, Mov { destination: Relative(1), source: Relative(2) }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 13 }, Call { location: 14 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 36 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4 }, Mov { destination: Relative(4), source: Direct(0) }, Mov { destination: Relative(5), source: Relative(2) }, BinaryIntOp { destination: Direct(0), op: Add, bit_size: U32, lhs: Direct(0), rhs: Relative(3) }, Call { location: 42 }, Mov { destination: Direct(0), source: Relative(0) }, Mov { destination: Relative(1), source: Relative(5) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 4294967293 }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U32, lhs: Relative(1), rhs: Relative(3) }, JumpIf { condition: Relative(4), location: 28 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(5) } }, Not { destination: Relative(1), source: Relative(2), bit_size: U32 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 3 }, Not { destination: Relative(3), source: Relative(2), bit_size: U32 }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U32, lhs: Relative(1), rhs: Relative(3) }, JumpIf { condition: Relative(2), location: 35 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 41 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, Call { location: 36 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U32, lhs: Relative(2), rhs: Relative(1) }, Mov { destination: Relative(2), source: Relative(3) }, Cast { destination: Relative(3), source: Relative(2), bit_size: Integer(U32) }, Cast { destination: Relative(4), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(1), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(1) }, Not { destination: Relative(4), source: Relative(5), bit_size: U1 }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(3), rhs: Relative(1) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(1), rhs: Relative(4) }, JumpIf { condition: Relative(3), location: 56 }, Call { location: 58 }, Mov { destination: Relative(1), source: Relative(2) }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "pZPdioMwEEbfJde5MP/RVymlpDYtgRAl1YWl+O47ccxue1FY7E2OcTzfwOA8yMWf59sppOtwJ93hQc45xBhupzj0bgpDgrcP0pSDKdIxSpgmHQcYhEW0K3iDYAiOEKQTAImAFAnQCIOwCEjRlAhIUQCGgBQDEAiJUCsk3CxAITTCICyiXaEaBENwhEBgisIUVVKWhZI6gdOUvS8DeBoJDGp02aeJdGmOkZIvF+f1o/vo0srJZag2lPh0AULgNURfnhb6ZzfvVVtda39l9W+bcbXpjO/yRVt9yXf1l5/5ylRfN+989d7nVm8+b+Wu/tVnZo8vW7H5qnn1j3BzfcgvK7aUpBzcOfrtep1T/1SdvsdaqSs65qH3lzn7kvS0p3AehKGSH2Ex4Yc/qJZqdlxK6x8=", + "debug_symbols": "nZPBjoMgEIbfhTMHQED0VZqmoZY2JAQN1U02xnffwZFdezDZeOFzHL+fQJyZPNx9et18fPZv0l5mck8+BP+6hb6zo+8jvJ0JywtXpOWUcE1aAagRBtGsEAzBEQJRkbYCSIRCaESNgBQFgBRJScUQkKIBAlEh5AoJVQ2QCIXQiBphEM0KxRAcIRCYojBF5ZRloaQc/TYm5/LJd3cBNzTY5OJI2jiFQMmXDdP60XuwceVoE3QZJS4+gBD49MHlp4X+2exYNcU15ldW/7a5UJvOxTlfFl+KM76qi6/ZkS+PfWH05otGntq/+Lw+48um2nzFPv0rVLbz6WM2lpyUvL0Ht5XPKXa77vg9lE6ZrSH1nXtMyeWk3YDBeqk0lfwKEwV/6kUZqtl1yVv/AA==", "file_map": { "50": { "source": "use std::ops::{Neg, Not};\n\n// x = 3\nfn main(x: u32) {\n let wx = Wrapper::new(x as i32);\n let ex: i32 = 3;\n\n assert((-wx).inner == -ex);\n assert((!wx).inner == !ex);\n\n // Check that it works with type variables (x's type isn't immediately known)\n let x = 3;\n assert(-3 == -x);\n}\n\nstruct Wrapper {\n inner: i32,\n}\n\nimpl Wrapper {\n fn new(inner: i32) -> Self {\n Wrapper { inner }\n }\n}\n\nimpl Neg for Wrapper {\n fn neg(self) -> Wrapper {\n Wrapper::new(-self.inner)\n }\n}\n\nimpl Not for Wrapper {\n fn not(self) -> Wrapper {\n Wrapper::new(!self.inner)\n }\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_0.snap index a2f22d90c1d..afad6fa5703 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_0.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_0.snap @@ -37,9 +37,9 @@ expression: artifact "return value indices : []", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 })], outputs: []", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 13 }, Call { location: 14 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 42 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Mov { destination: Relative(3), source: Relative(4) }, Cast { destination: Relative(4), source: Relative(3), bit_size: Integer(U32) }, Const { destination: Relative(5), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(1), rhs: Relative(5) }, Not { destination: Relative(1), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(5) }, BinaryIntOp { destination: Relative(4), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(1) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(4), rhs: Relative(1) }, JumpIf { condition: Relative(5), location: 28 }, Call { location: 48 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4294967293 }, Cast { destination: Relative(4), source: Relative(1), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(1), op: Equals, bit_size: U32, lhs: Relative(3), rhs: Relative(4) }, JumpIf { condition: Relative(1), location: 34 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(5) } }, Not { destination: Relative(1), source: Relative(2), bit_size: U32 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 3 }, Not { destination: Relative(3), source: Relative(2), bit_size: U32 }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U32, lhs: Relative(1), rhs: Relative(3) }, JumpIf { condition: Relative(2), location: 41 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 47 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 13 }, Call { location: 14 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 41 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Mov { destination: Relative(3), source: Relative(4) }, Cast { destination: Relative(4), source: Relative(3), bit_size: Integer(U32) }, Const { destination: Relative(5), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(1), rhs: Relative(5) }, Not { destination: Relative(1), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(5) }, BinaryIntOp { destination: Relative(4), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(1) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(4), rhs: Relative(1) }, JumpIf { condition: Relative(5), location: 28 }, Call { location: 47 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4294967293 }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U32, lhs: Relative(3), rhs: Relative(1) }, JumpIf { condition: Relative(4), location: 33 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(5) } }, Not { destination: Relative(1), source: Relative(2), bit_size: U32 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 3 }, Not { destination: Relative(3), source: Relative(2), bit_size: U32 }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U32, lhs: Relative(1), rhs: Relative(3) }, JumpIf { condition: Relative(2), location: 40 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 46 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "pZPBjoMgEIbfhTMHQFD0VZqmoRYbEoKG6iYb47vv4MiuPZhs7IVPHL9/nMPM5GHv0/PmQte/SHOZyT06793z5vvWjK4P8HYmLB1ckYZTwkvSFIAKoRH1CsEQHCEQBUIiFAJTBKYISJGAekUBKQrAEQJRICClAkBKCSgRkKIBGlGvkJCil4WSPMltjNamQXajwcCDiTaMpAmT95R8GT+tH70GE1aOJkKVUWLDAwiBnfM2PS30z2bHqs6u1r+y+rfNhdp0Lg59cezLuth8xeSZ/kWd+0tx6v/lZ76qsl+yI7889oUuN1/Up+ZX2efVu3+Fm2ldfFuVJSVFZ+7ebtduCu2uOn4PuZJXbYh9ax9TtClpt29wXqSgsrrCgvF00VSx65Ja/wA=", + "debug_symbols": "nZPRioQgFIbfxWsv1DSrVxmGwSkbBLFwamGJ3n2PndxtLoKlG7/Mvv90wLOQzj7n18OFfniT5raQZ3Teu9fDD62Z3BDg7UJYWrgiDaeEl6QpABpRIeoNgiE4QiAKhEQoBKYITBGQIgH1hoIhOEIgIKUEQIoCKASkaIBGVAhI0etKSW7hMUVrUweHnqDT0UQbJtKE2XtKvoyft4/eowkbJxPhlFFiQweEwN55m55W+mezc7XKblX9yurfNhdq17k49cW5L+ti9xWTl+rLXF+KK77S2S/Zma/OfVGVuy/qS/+vss/1p3+HnWld/Ljja0qKzjy93bf9HNrD6fQ95pM8I2McWtvN0aakw6DAepOcyvIOk8HTRlNZ39dU+gc=", "file_map": { "50": { "source": "use std::ops::{Neg, Not};\n\n// x = 3\nfn main(x: u32) {\n let wx = Wrapper::new(x as i32);\n let ex: i32 = 3;\n\n assert((-wx).inner == -ex);\n assert((!wx).inner == !ex);\n\n // Check that it works with type variables (x's type isn't immediately known)\n let x = 3;\n assert(-3 == -x);\n}\n\nstruct Wrapper {\n inner: i32,\n}\n\nimpl Wrapper {\n fn new(inner: i32) -> Self {\n Wrapper { inner }\n }\n}\n\nimpl Neg for Wrapper {\n fn neg(self) -> Wrapper {\n Wrapper::new(-self.inner)\n }\n}\n\nimpl Not for Wrapper {\n fn not(self) -> Wrapper {\n Wrapper::new(!self.inner)\n }\n}\n", diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_9223372036854775807.snap index a2f22d90c1d..afad6fa5703 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_9223372036854775807.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/unary_operator_overloading/execute__tests__force_brillig_true_inliner_9223372036854775807.snap @@ -37,9 +37,9 @@ expression: artifact "return value indices : []", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 })], outputs: []", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 13 }, Call { location: 14 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 42 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Mov { destination: Relative(3), source: Relative(4) }, Cast { destination: Relative(4), source: Relative(3), bit_size: Integer(U32) }, Const { destination: Relative(5), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(1), rhs: Relative(5) }, Not { destination: Relative(1), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(5) }, BinaryIntOp { destination: Relative(4), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(1) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(4), rhs: Relative(1) }, JumpIf { condition: Relative(5), location: 28 }, Call { location: 48 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4294967293 }, Cast { destination: Relative(4), source: Relative(1), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(1), op: Equals, bit_size: U32, lhs: Relative(3), rhs: Relative(4) }, JumpIf { condition: Relative(1), location: 34 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(5) } }, Not { destination: Relative(1), source: Relative(2), bit_size: U32 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 3 }, Not { destination: Relative(3), source: Relative(2), bit_size: U32 }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U32, lhs: Relative(1), rhs: Relative(3) }, JumpIf { condition: Relative(2), location: 41 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 47 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 13 }, Call { location: 14 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 0 }, Stop { return_data: HeapVector { pointer: Relative(1), size: Relative(2) } }, Return, Call { location: 41 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U32, lhs: Relative(3), rhs: Relative(2) }, Mov { destination: Relative(3), source: Relative(4) }, Cast { destination: Relative(4), source: Relative(3), bit_size: Integer(U32) }, Const { destination: Relative(5), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(1), rhs: Relative(5) }, Not { destination: Relative(1), source: Relative(6), bit_size: U1 }, BinaryIntOp { destination: Relative(6), op: LessThan, bit_size: U32, lhs: Relative(4), rhs: Relative(5) }, BinaryIntOp { destination: Relative(4), op: Mul, bit_size: U1, lhs: Relative(6), rhs: Relative(1) }, BinaryIntOp { destination: Relative(5), op: Equals, bit_size: U1, lhs: Relative(4), rhs: Relative(1) }, JumpIf { condition: Relative(5), location: 28 }, Call { location: 47 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4294967293 }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U32, lhs: Relative(3), rhs: Relative(1) }, JumpIf { condition: Relative(4), location: 33 }, Const { destination: Relative(5), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(5) } }, Not { destination: Relative(1), source: Relative(2), bit_size: U32 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 3 }, Not { destination: Relative(3), source: Relative(2), bit_size: U32 }, BinaryIntOp { destination: Relative(2), op: Equals, bit_size: U32, lhs: Relative(1), rhs: Relative(3) }, JumpIf { condition: Relative(2), location: 40 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 0 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Relative(4) } }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 46 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 2920182694213909827 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "pZPBjoMgEIbfhTMHQFD0VZqmoRYbEoKG6iYb47vv4MiuPZhs7IVPHL9/nMPM5GHv0/PmQte/SHOZyT06793z5vvWjK4P8HYmLB1ckYZTwkvSFIAKoRH1CsEQHCEQBUIiFAJTBKYISJGAekUBKQrAEQJRICClAkBKCSgRkKIBGlGvkJCil4WSPMltjNamQXajwcCDiTaMpAmT95R8GT+tH70GE1aOJkKVUWLDAwiBnfM2PS30z2bHqs6u1r+y+rfNhdp0Lg59cezLuth8xeSZ/kWd+0tx6v/lZ76qsl+yI7889oUuN1/Up+ZX2efVu3+Fm2ldfFuVJSVFZ+7ebtduCu2uOn4PuZJXbYh9ax9TtClpt29wXqSgsrrCgvF00VSx65Ja/wA=", + "debug_symbols": "nZPRioQgFIbfxWsv1DSrVxmGwSkbBLFwamGJ3n2PndxtLoKlG7/Mvv90wLOQzj7n18OFfniT5raQZ3Teu9fDD62Z3BDg7UJYWrgiDaeEl6QpABpRIeoNgiE4QiAKhEQoBKYITBGQIgH1hoIhOEIgIKUEQIoCKASkaIBGVAhI0etKSW7hMUVrUweHnqDT0UQbJtKE2XtKvoyft4/eowkbJxPhlFFiQweEwN55m55W+mezc7XKblX9yurfNhdq17k49cW5L+ti9xWTl+rLXF+KK77S2S/Zma/OfVGVuy/qS/+vss/1p3+HnWld/Ljja0qKzjy93bf9HNrD6fQ95pM8I2McWtvN0aakw6DAepOcyvIOk8HTRlNZ39dU+gc=", "file_map": { "50": { "source": "use std::ops::{Neg, Not};\n\n// x = 3\nfn main(x: u32) {\n let wx = Wrapper::new(x as i32);\n let ex: i32 = 3;\n\n assert((-wx).inner == -ex);\n assert((!wx).inner == !ex);\n\n // Check that it works with type variables (x's type isn't immediately known)\n let x = 3;\n assert(-3 == -x);\n}\n\nstruct Wrapper {\n inner: i32,\n}\n\nimpl Wrapper {\n fn new(inner: i32) -> Self {\n Wrapper { inner }\n }\n}\n\nimpl Neg for Wrapper {\n fn neg(self) -> Wrapper {\n Wrapper::new(-self.inner)\n }\n}\n\nimpl Not for Wrapper {\n fn not(self) -> Wrapper {\n Wrapper::new(!self.inner)\n }\n}\n", From 486744c7b54c6048da1ebd7f0f213ccc48c02066 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Tue, 10 Jun 2025 16:15:16 +0000 Subject: [PATCH 06/10] more snaps --- ...ig_false_inliner_-9223372036854775808.snap | 72 +++++++++++++++++++ ..._tests__force_brillig_false_inliner_0.snap | 72 +++++++++++++++++++ ...lig_false_inliner_9223372036854775807.snap | 72 +++++++++++++++++++ ...lig_true_inliner_-9223372036854775808.snap | 62 ++++++++++++++++ ...__tests__force_brillig_true_inliner_0.snap | 62 ++++++++++++++++ ...llig_true_inliner_9223372036854775807.snap | 62 ++++++++++++++++ 6 files changed, 402 insertions(+) create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_0.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_9223372036854775807.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_0.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_9223372036854775807.snap diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap new file mode 100644 index 00000000000..7ab2a2bba0e --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap @@ -0,0 +1,72 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "public" + }, + "error_types": { + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _7", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1]", + "BLACKBOX::RANGE [(_0, 32)] []", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 2147483648 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 4294967296 })], outputs: [Simple(Witness(2)), Simple(Witness(3))]", + "BLACKBOX::RANGE [(_2, 1)] []", + "BLACKBOX::RANGE [(_3, 32)] []", + "EXPR [ (1, _0) (-4294967296, _2) (-1, _3) 2147483648 ]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 4294967296 })], outputs: [Simple(Witness(4)), Simple(Witness(5))]", + "BLACKBOX::RANGE [(_4, 1)] []", + "BLACKBOX::RANGE [(_5, 32)] []", + "EXPR [ (1, _0) (-4294967296, _4) (-1, _5) 0 ]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(5))], q_c: 2147483648 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 4294967296 })], outputs: [Simple(Witness(6)), Simple(Witness(7))]", + "BLACKBOX::RANGE [(_6, 1)] []", + "BLACKBOX::RANGE [(_7, 32)] []", + "EXPR [ (1, _5) (-4294967296, _6) (-1, _7) 2147483648 ]", + "EXPR [ (1, _2, _6) (-1, _6) 0 ]", + "EXPR [ (1, _1) (-1, _5) 0 ]", + "unconstrained func 0", + "[Const { destination: Direct(10), bit_size: Integer(U32), value: 2 }, Const { destination: Direct(11), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(10), offset_address: Direct(11) }, BinaryFieldOp { destination: Direct(2), op: IntegerDiv, lhs: Direct(0), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Mul, lhs: Direct(2), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Sub, lhs: Direct(0), rhs: Direct(1) }, Mov { destination: Direct(0), source: Direct(2) }, Stop { return_data: HeapVector { pointer: Direct(11), size: Direct(10) } }]" + ], + "debug_symbols": "dZDRDoIwDEX/pc97YAoq/IoxZEAhS5axjM3EEP7droDigy+3a2/PctMZOmziUGvbjxNU9xkar43RQ23GVgU9WprOi4C9rYNHpBEcfKKc8mgDVDYaI+CpTOSlySnLNShPbiYAbUeVPuy1wfRaxJfO/qPyXG6wzPMPXhD/oE612v8kBkmLAk6sZ9actWC9sF5Zb6wlq8zWstJyxWXilxTNa9UY3C7SR9seDhRebnf2Ezo/tthFjykaexT2DQ==", + "file_map": { + "50": { + "source": "fn main(a: i32) -> pub i32 {\n let mut r: i32 = 0;\n let s: i32 = -2;\n let e: i32 = -1;\n for _ in (s - 0)..(e + 0) {\n r = r + a;\n }\n r\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "directive_integer_quotient" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_0.snap new file mode 100644 index 00000000000..7ab2a2bba0e --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_0.snap @@ -0,0 +1,72 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "public" + }, + "error_types": { + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _7", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1]", + "BLACKBOX::RANGE [(_0, 32)] []", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 2147483648 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 4294967296 })], outputs: [Simple(Witness(2)), Simple(Witness(3))]", + "BLACKBOX::RANGE [(_2, 1)] []", + "BLACKBOX::RANGE [(_3, 32)] []", + "EXPR [ (1, _0) (-4294967296, _2) (-1, _3) 2147483648 ]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 4294967296 })], outputs: [Simple(Witness(4)), Simple(Witness(5))]", + "BLACKBOX::RANGE [(_4, 1)] []", + "BLACKBOX::RANGE [(_5, 32)] []", + "EXPR [ (1, _0) (-4294967296, _4) (-1, _5) 0 ]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(5))], q_c: 2147483648 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 4294967296 })], outputs: [Simple(Witness(6)), Simple(Witness(7))]", + "BLACKBOX::RANGE [(_6, 1)] []", + "BLACKBOX::RANGE [(_7, 32)] []", + "EXPR [ (1, _5) (-4294967296, _6) (-1, _7) 2147483648 ]", + "EXPR [ (1, _2, _6) (-1, _6) 0 ]", + "EXPR [ (1, _1) (-1, _5) 0 ]", + "unconstrained func 0", + "[Const { destination: Direct(10), bit_size: Integer(U32), value: 2 }, Const { destination: Direct(11), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(10), offset_address: Direct(11) }, BinaryFieldOp { destination: Direct(2), op: IntegerDiv, lhs: Direct(0), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Mul, lhs: Direct(2), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Sub, lhs: Direct(0), rhs: Direct(1) }, Mov { destination: Direct(0), source: Direct(2) }, Stop { return_data: HeapVector { pointer: Direct(11), size: Direct(10) } }]" + ], + "debug_symbols": "dZDRDoIwDEX/pc97YAoq/IoxZEAhS5axjM3EEP7droDigy+3a2/PctMZOmziUGvbjxNU9xkar43RQ23GVgU9WprOi4C9rYNHpBEcfKKc8mgDVDYaI+CpTOSlySnLNShPbiYAbUeVPuy1wfRaxJfO/qPyXG6wzPMPXhD/oE612v8kBkmLAk6sZ9actWC9sF5Zb6wlq8zWstJyxWXilxTNa9UY3C7SR9seDhRebnf2Ezo/tthFjykaexT2DQ==", + "file_map": { + "50": { + "source": "fn main(a: i32) -> pub i32 {\n let mut r: i32 = 0;\n let s: i32 = -2;\n let e: i32 = -1;\n for _ in (s - 0)..(e + 0) {\n r = r + a;\n }\n r\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "directive_integer_quotient" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_9223372036854775807.snap new file mode 100644 index 00000000000..7ab2a2bba0e --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_false_inliner_9223372036854775807.snap @@ -0,0 +1,72 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "public" + }, + "error_types": { + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _7", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1]", + "BLACKBOX::RANGE [(_0, 32)] []", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 2147483648 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 4294967296 })], outputs: [Simple(Witness(2)), Simple(Witness(3))]", + "BLACKBOX::RANGE [(_2, 1)] []", + "BLACKBOX::RANGE [(_3, 32)] []", + "EXPR [ (1, _0) (-4294967296, _2) (-1, _3) 2147483648 ]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 4294967296 })], outputs: [Simple(Witness(4)), Simple(Witness(5))]", + "BLACKBOX::RANGE [(_4, 1)] []", + "BLACKBOX::RANGE [(_5, 32)] []", + "EXPR [ (1, _0) (-4294967296, _4) (-1, _5) 0 ]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(5))], q_c: 2147483648 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 4294967296 })], outputs: [Simple(Witness(6)), Simple(Witness(7))]", + "BLACKBOX::RANGE [(_6, 1)] []", + "BLACKBOX::RANGE [(_7, 32)] []", + "EXPR [ (1, _5) (-4294967296, _6) (-1, _7) 2147483648 ]", + "EXPR [ (1, _2, _6) (-1, _6) 0 ]", + "EXPR [ (1, _1) (-1, _5) 0 ]", + "unconstrained func 0", + "[Const { destination: Direct(10), bit_size: Integer(U32), value: 2 }, Const { destination: Direct(11), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(10), offset_address: Direct(11) }, BinaryFieldOp { destination: Direct(2), op: IntegerDiv, lhs: Direct(0), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Mul, lhs: Direct(2), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Sub, lhs: Direct(0), rhs: Direct(1) }, Mov { destination: Direct(0), source: Direct(2) }, Stop { return_data: HeapVector { pointer: Direct(11), size: Direct(10) } }]" + ], + "debug_symbols": "dZDRDoIwDEX/pc97YAoq/IoxZEAhS5axjM3EEP7droDigy+3a2/PctMZOmziUGvbjxNU9xkar43RQ23GVgU9WprOi4C9rYNHpBEcfKKc8mgDVDYaI+CpTOSlySnLNShPbiYAbUeVPuy1wfRaxJfO/qPyXG6wzPMPXhD/oE612v8kBkmLAk6sZ9actWC9sF5Zb6wlq8zWstJyxWXilxTNa9UY3C7SR9seDhRebnf2Ezo/tthFjykaexT2DQ==", + "file_map": { + "50": { + "source": "fn main(a: i32) -> pub i32 {\n let mut r: i32 = 0;\n let s: i32 = -2;\n let e: i32 = -1;\n for _ in (s - 0)..(e + 0) {\n r = r + a;\n }\n r\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "directive_integer_quotient" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap new file mode 100644 index 00000000000..240d0887fd2 --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap @@ -0,0 +1,62 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "public" + }, + "error_types": { + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _1", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 })], outputs: [Simple(Witness(1))]", + "unconstrained func 0", + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32838 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 14 }, Call { location: 15 }, Mov { destination: Direct(32837), source: Relative(1) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 1 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, Return, Call { location: 28 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(3) }, Mov { destination: Relative(2), source: Relative(1) }, Cast { destination: Relative(1), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(1), rhs: Relative(3) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(1), rhs: Relative(4) }, JumpIf { condition: Relative(3), location: 26 }, Call { location: 34 }, Mov { destination: Relative(1), source: Relative(2) }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 33 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 5019202896831570965 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + ], + "debug_symbols": "dZBNDoMgEIXvMmsWIvbPqxhjUEdDQtAgNGkMd+8g2tpFN3wMw3sDb4UeWz82ygzTAmW1QmuV1mps9NRJpyZDpytkceFXKDkDfku4Jzw25FkCT8gTREKRcCGEwOBwbpxFjManUfSAWVo0DkrjtWbwlNpvl5ZZmo1OWupmDND0RDIclMa4C+yrzv5LuXjsYl4UH/mF9DVVslP25/MhOlklW417OXjTnbruNR+dI7zZTh323mJ0OiVIa5XfmRA1JUdZVaJg4lqHOPoN", + "file_map": { + "50": { + "source": "fn main(a: i32) -> pub i32 {\n let mut r: i32 = 0;\n let s: i32 = -2;\n let e: i32 = -1;\n for _ in (s - 0)..(e + 0) {\n r = r + a;\n }\n r\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "main" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_0.snap new file mode 100644 index 00000000000..240d0887fd2 --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_0.snap @@ -0,0 +1,62 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "public" + }, + "error_types": { + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _1", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 })], outputs: [Simple(Witness(1))]", + "unconstrained func 0", + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32838 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 14 }, Call { location: 15 }, Mov { destination: Direct(32837), source: Relative(1) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 1 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, Return, Call { location: 28 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(3) }, Mov { destination: Relative(2), source: Relative(1) }, Cast { destination: Relative(1), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(1), rhs: Relative(3) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(1), rhs: Relative(4) }, JumpIf { condition: Relative(3), location: 26 }, Call { location: 34 }, Mov { destination: Relative(1), source: Relative(2) }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 33 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 5019202896831570965 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + ], + "debug_symbols": "dZBNDoMgEIXvMmsWIvbPqxhjUEdDQtAgNGkMd+8g2tpFN3wMw3sDb4UeWz82ygzTAmW1QmuV1mps9NRJpyZDpytkceFXKDkDfku4Jzw25FkCT8gTREKRcCGEwOBwbpxFjManUfSAWVo0DkrjtWbwlNpvl5ZZmo1OWupmDND0RDIclMa4C+yrzv5LuXjsYl4UH/mF9DVVslP25/MhOlklW417OXjTnbruNR+dI7zZTh323mJ0OiVIa5XfmRA1JUdZVaJg4lqHOPoN", + "file_map": { + "50": { + "source": "fn main(a: i32) -> pub i32 {\n let mut r: i32 = 0;\n let s: i32 = -2;\n let e: i32 = -1;\n for _ in (s - 0)..(e + 0) {\n r = r + a;\n }\n r\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "main" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_9223372036854775807.snap new file mode 100644 index 00000000000..240d0887fd2 --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8305/execute__tests__force_brillig_true_inliner_9223372036854775807.snap @@ -0,0 +1,62 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "integer", + "sign": "signed", + "width": 32 + }, + "visibility": "public" + }, + "error_types": { + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _1", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 })], outputs: [Simple(Witness(1))]", + "unconstrained func 0", + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32838 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U32) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 14 }, Call { location: 15 }, Mov { destination: Direct(32837), source: Relative(1) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 1 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, Return, Call { location: 28 }, Cast { destination: Relative(2), source: Relative(1), bit_size: Integer(U32) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 2147483648 }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(3) }, Mov { destination: Relative(2), source: Relative(1) }, Cast { destination: Relative(1), source: Relative(2), bit_size: Integer(U32) }, BinaryIntOp { destination: Relative(5), op: LessThan, bit_size: U32, lhs: Relative(1), rhs: Relative(3) }, BinaryIntOp { destination: Relative(1), op: Mul, bit_size: U1, lhs: Relative(5), rhs: Relative(4) }, BinaryIntOp { destination: Relative(3), op: Equals, bit_size: U1, lhs: Relative(1), rhs: Relative(4) }, JumpIf { condition: Relative(3), location: 26 }, Call { location: 34 }, Mov { destination: Relative(1), source: Relative(2) }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 33 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 5019202896831570965 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + ], + "debug_symbols": "dZBNDoMgEIXvMmsWIvbPqxhjUEdDQtAgNGkMd+8g2tpFN3wMw3sDb4UeWz82ygzTAmW1QmuV1mps9NRJpyZDpytkceFXKDkDfku4Jzw25FkCT8gTREKRcCGEwOBwbpxFjManUfSAWVo0DkrjtWbwlNpvl5ZZmo1OWupmDND0RDIclMa4C+yrzv5LuXjsYl4UH/mF9DVVslP25/MhOlklW417OXjTnbruNR+dI7zZTh323mJ0OiVIa5XfmRA1JUdZVaJg4lqHOPoN", + "file_map": { + "50": { + "source": "fn main(a: i32) -> pub i32 {\n let mut r: i32 = 0;\n let s: i32 = -2;\n let e: i32 = -1;\n for _ in (s - 0)..(e + 0) {\n r = r + a;\n }\n r\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "main" + ] +} From 265dcba3eaf69ae167eaecabaf15bb97a52d88be Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Tue, 10 Jun 2025 16:25:10 +0000 Subject: [PATCH 07/10] bump timeout --- .github/benchmark_projects.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/benchmark_projects.yml b/.github/benchmark_projects.yml index d4680b59cc1..ce5fb7f3340 100644 --- a/.github/benchmark_projects.yml +++ b/.github/benchmark_projects.yml @@ -25,7 +25,7 @@ projects: path: noir-projects/noir-protocol-circuits/crates/private-kernel-reset num_runs: 5 timeout: 250 - compilation-timeout: 8 + compilation-timeout: 10 execution-timeout: 0.35 compilation-memory-limit: 750 execution-memory-limit: 300 From d13ae7c18d201df964352e67f392e170e1bbad54 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Tue, 10 Jun 2025 17:22:37 +0000 Subject: [PATCH 08/10] promote ConstantDoesNotFitInType to a non-internal error in the interpreter --- compiler/noirc_evaluator/src/ssa/interpreter/errors.rs | 4 ++-- compiler/noirc_evaluator/src/ssa/interpreter/value.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/noirc_evaluator/src/ssa/interpreter/errors.rs b/compiler/noirc_evaluator/src/ssa/interpreter/errors.rs index 4c81179718b..1c94b947cd6 100644 --- a/compiler/noirc_evaluator/src/ssa/interpreter/errors.rs +++ b/compiler/noirc_evaluator/src/ssa/interpreter/errors.rs @@ -58,6 +58,8 @@ pub enum InterpreterError { ToRadixFailed { field_id: ValueId, field: FieldElement, radix: u32 }, #[error("Failed to solve blackbox function {name}: {reason}")] BlackBoxError { name: String, reason: String }, + #[error("Constant `{constant}` does not fit in type `{typ}`")] + ConstantDoesNotFitInType { constant: FieldElement, typ: NumericType }, } /// These errors can only result from interpreting malformed SSA @@ -140,6 +142,4 @@ pub enum InternalError { UnexpectedInstruction { reason: &'static str }, #[error("Expected array of {expected_size} elements, got {size}")] InvalidInputSize { expected_size: usize, size: usize }, - #[error("Constant `{constant}` does not fit in type `{typ}`")] - ConstantDoesNotFitInType { constant: FieldElement, typ: NumericType }, } diff --git a/compiler/noirc_evaluator/src/ssa/interpreter/value.rs b/compiler/noirc_evaluator/src/ssa/interpreter/value.rs index 88b2311d719..4fad37cbbf4 100644 --- a/compiler/noirc_evaluator/src/ssa/interpreter/value.rs +++ b/compiler/noirc_evaluator/src/ssa/interpreter/value.rs @@ -286,10 +286,10 @@ impl NumericValue { } pub fn from_constant(constant: FieldElement, typ: NumericType) -> IResult { - use super::InternalError::{ConstantDoesNotFitInType, UnsupportedNumericType}; - use super::InterpreterError::Internal; + use super::InterpreterError::{ConstantDoesNotFitInType, Internal}; + use super::InternalError::UnsupportedNumericType; - let does_not_fit = Internal(ConstantDoesNotFitInType { constant, typ }); + let does_not_fit = ConstantDoesNotFitInType { constant, typ }; match typ { NumericType::NativeField => Ok(Self::Field(constant)), From 66466249597bc3955e33b34b77cfefc3df6bf30a Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Tue, 10 Jun 2025 17:31:23 +0000 Subject: [PATCH 09/10] fmt --- compiler/noirc_evaluator/src/ssa/interpreter/value.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/noirc_evaluator/src/ssa/interpreter/value.rs b/compiler/noirc_evaluator/src/ssa/interpreter/value.rs index 4fad37cbbf4..47acd01a9e7 100644 --- a/compiler/noirc_evaluator/src/ssa/interpreter/value.rs +++ b/compiler/noirc_evaluator/src/ssa/interpreter/value.rs @@ -286,8 +286,8 @@ impl NumericValue { } pub fn from_constant(constant: FieldElement, typ: NumericType) -> IResult { - use super::InterpreterError::{ConstantDoesNotFitInType, Internal}; use super::InternalError::UnsupportedNumericType; + use super::InterpreterError::{ConstantDoesNotFitInType, Internal}; let does_not_fit = ConstantDoesNotFitInType { constant, typ }; From 10456e847fc7bc0d95cfd04e94072258ff2ef63c Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 11 Jun 2025 22:01:13 +0000 Subject: [PATCH 10/10] return value in prover toml and snap --- test_programs/execution_success/regression_8305/Prover.toml | 1 + .../execute__tests__force_brillig_false_inliner_0.snap | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test_programs/execution_success/regression_8305/Prover.toml b/test_programs/execution_success/regression_8305/Prover.toml index 21eded967a3..dcb1d8e05b2 100644 --- a/test_programs/execution_success/regression_8305/Prover.toml +++ b/test_programs/execution_success/regression_8305/Prover.toml @@ -1 +1,2 @@ a = -2 +return = -2 \ No newline at end of file diff --git a/tooling/nargo_cli/tests/snapshots/compile_success_empty/brillig_cast/execute__tests__force_brillig_false_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/compile_success_empty/brillig_cast/execute__tests__force_brillig_false_inliner_0.snap index c0d6bb03c1e..7de940827c8 100644 --- a/tooling/nargo_cli/tests/snapshots/compile_success_empty/brillig_cast/execute__tests__force_brillig_false_inliner_0.snap +++ b/tooling/nargo_cli/tests/snapshots/compile_success_empty/brillig_cast/execute__tests__force_brillig_false_inliner_0.snap @@ -17,7 +17,7 @@ expression: artifact "public parameters indices : []", "return value indices : []" ], - "debug_symbols": "nZDRCoMwDEX/pc99EIc4/ZUxpNYohdCW2ApD/PdFsVOEwdhTcnNzbiCz6KCNQ2Ns70ZRP2bRkkE0Q4NOq2Cc5em8SJFkEwiAR+LkM+UVgQ2ithFRiklh3JZGr+xWgyJ2MynAdlw5sDcIa7fIg86+o0WZ73BRVh+8+J2/3xJf5f/wx/0L/2SltKHrxyZFRrUIu+yj1Sc3vHxy0sc9OQ1dJFiTNo+z3w==", + "debug_symbols": "XY5BCsQwCEXv4rqLWfcqw1BsaosgJtikMITefWyYQOlK/3/6tcJCc9km1jXuML4rzMYivE0SA2aO6m49B+hyykbkFty4byU00gyjFpEBDpTShvaE2mpGc/oagHTx6oErC13d+XGBge158UBjnIX+ci0abjR/Uyf942Qx0FKMrqTGPPsH", "file_map": {}, "names": [ "main"