On Tue, 9 Dec 2025 07:54:05 GMT, Eric Fang <[email protected]> wrote:

>> @erifan I don't see why `firstNonZero` cannot do the same and start from 
>> `a[idx]` here?
>
> @merykitty I apologize for not being clear. Actually, It's `SUADDReduce` that 
> doesn't allow starting with `a[idx]` because that would result in `a[idx]` 
> being added twice.
> 
> Specifically, this happens as follows: `gen_saturating_reduction_op` (used to 
> generate `SUADDReduce`) and `gen_reduction_op_func` (used to generate 
> `umin/umax, etc.`) both use the `Unit-Reduction-Scalar-op.template` template. 
> When we modify it, `SUADDReduce` is also affected. Therefore, a new template 
> needs to be defined.

But then the loop can start from `idx + 1` instead of `idx`, right?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28692#discussion_r2601512724

Reply via email to