On Mon, 30 Mar 2026 08:21:30 GMT, Emanuel Peter <[email protected]> wrote:

>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/AbstractVector.java
>>  line 573:
>> 
>>> 571:             return 0 <= part && part < limit;
>>> 572:         } else if (limit < 0) {  // insertion (output is logical 
>>> result with padding)
>>> 573:             return limit < part && part <= 0;
>> 
>> `return limit <= part ...` ? since you flipped the operands.
>
> No, this is correct. `part` in `[imit+1..0]`. The `limit` is exclusive.
> 
> Note: Flipping `a < b` to `b > a` is correct. What may be additionally 
> confusing here is that before the `limit` was positive, but now `partLimit` 
> returns a negative number, so we drop the `-`.
> 
> Maybe you meant something else. Can you clarify?

No, I was confused on the inequalities.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30113#discussion_r3011098311

Reply via email to