| ... | ... | @@ -3205,14 +3205,11 @@ fn zirValidateArrayInit( |
| 3205 | 3205 | // instruction after it within the same block. |
| 3206 | 3206 | // Possible performance enhancement: save the `block_index` between iterations |
| 3207 | 3207 | // of the for loop. |
| 3208 | | const next_air_inst = inst: { |
| 3209 | | var block_index = block.instructions.items.len - 1; |
| 3210 | | while (block.instructions.items[block_index] != elem_ptr_air_inst) { |
| 3211 | | block_index -= 1; |
| 3212 | | } |
| 3213 | | first_block_index = @minimum(first_block_index, block_index); |
| 3214 | | break :inst block.instructions.items[block_index + 1]; |
| 3215 | | }; |
| 3208 | var block_index = block.instructions.items.len - 1; |
| 3209 | while (block.instructions.items[block_index] != elem_ptr_air_inst) { |
| 3210 | block_index -= 1; |
| 3211 | } |
| 3212 | first_block_index = @minimum(first_block_index, block_index); |
| 3216 | 3213 | |
| 3217 | 3214 | // Array has one possible value, so value is always comptime-known |
| 3218 | 3215 | if (opt_opv) |opv| { |
| ... | ... | @@ -3222,6 +3219,7 @@ fn zirValidateArrayInit( |
| 3222 | 3219 | |
| 3223 | 3220 | // If the next instructon is a store with a comptime operand, this element |
| 3224 | 3221 | // is comptime. |
| 3222 | const next_air_inst = block.instructions.items[block_index + 1]; |
| 3225 | 3223 | switch (air_tags[next_air_inst]) { |
| 3226 | 3224 | .store => { |
| 3227 | 3225 | const bin_op = air_datas[next_air_inst].bin_op; |