From c3d45f8f5193f4c5d5a3a8596b209f76fcc718e2 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Fri, 4 Oct 2024 16:10:30 +0100 Subject: [PATCH] Update compiler/noirc_evaluator/src/ssa/ir/instruction.rs --- compiler/noirc_evaluator/src/ssa/ir/instruction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/noirc_evaluator/src/ssa/ir/instruction.rs b/compiler/noirc_evaluator/src/ssa/ir/instruction.rs index edfe2519eaf..6aa9acaca22 100644 --- a/compiler/noirc_evaluator/src/ssa/ir/instruction.rs +++ b/compiler/noirc_evaluator/src/ssa/ir/instruction.rs @@ -835,10 +835,10 @@ fn try_optimize_array_get_from_previous_set( /// We want to optimize `v7` to `v5`. We see that `v3` comes from an array get to `v1`. We follow `v5` backwards and see an array set /// to `v1` and see that the previous array set occurs to a different constant index. /// -/// For each array set: +/// For each array_set: /// - If the index is non-constant we fail the optimization since any index may be changed. /// - If the index is constant and is our target index, we conservatively fail the optimization. -/// - Otherwise, we check the array value of the `array_set``. We will refer to this array as array'. +/// - Otherwise, we check the array value of the `array_set`. We will refer to this array as array'. /// In the case above, array' is `v1` from `v5 = array set ...` /// - If the original `array_set` value comes from an `array_get`, check the array in that `array_get` against array'. /// - If the two values are equal we can simplify.