On Tue, 9 Dec 2025 08:01:07 GMT, Quan Anh Mai <[email protected]> wrote:

>> @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?

What I really wanted to talk about was code consistency and maintainability. 
There are many ways to handle this problem if we want to. I just think the 
current code style might be more maintainable, since the masked version is 
written this way too. The code looks more consistent.

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

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

Reply via email to