Skip to content

Commit 8923c9b

Browse files
committed
Fix the most recent changes to lowering accumulations
Signed-off-by: Lukasz Stafiniak <lukstafi@gmail.com>
1 parent 075bc6a commit 8923c9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arrayjit/lib/assignments.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ let%track4_sexp to_low_level code =
230230
let lhs_ll = get (Node lhs) lhs_idcs in
231231
let rhses_ll = Array.mapi rhses_idcs ~f:(fun i rhs_idcs -> get rhses.(i) rhs_idcs) in
232232
let rhs2 = apply_op op rhses_ll in
233-
if can_skip_accumulation ~projections then set lhs lhs_idcs rhs2
233+
if initialize_neutral && can_skip_accumulation ~projections then set lhs lhs_idcs rhs2
234234
else set lhs lhs_idcs @@ apply_op (Ops.Binop accum) [| lhs_ll; rhs2 |]
235235
in
236236
let rec for_loop rev_iters = function

0 commit comments

Comments
 (0)