RFR: 8286941: Add mask IR for partial vector operations for ARM SVE [v9]

Emanuel Peter epeter at openjdk.org
Fri Nov 28 08:06:06 UTC 2025


On Fri, 28 Nov 2025 07:38:11 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> We can continue the conversation in:
>> https://bugs.openjdk.org/browse/JDK-8371603
>
>> Yes, exactly. I think instead of:
>> 
>> ```
>> return VectorNode::try_to_gen_masked_vector(phase, this, vt);
>> ```
>> 
>> we should do
>> 
>> ```
>> Node* progress = VectorNode::try_to_gen_masked_vector(phase, this, vt);
>> if (progress != nullptr) { return progress; }
>> ```
>> 
>> That should be correct, right?
> 
> Yes, I think so.
> 
>> Of course the naming here is a bit confusing, and suggests that this may not be correct. Because `vector_needs_partial_operations` would suggest we _always_ need to do partial operations. And so then we would expect that `try_to_gen_masked_vector` would have to _always_ succeed. And so maybe that is why the reviewers did not think that we should continue with `LoadNode::Ideal` if it fails, I suppose? So I think the names should be changed to `maybe_vector_needs_partial_operations` and `transform_to_partial_vector_if_needed`, or similar. What do you think?
> 
> `vector_needs_partial_operations` is used to check whether we need consider the partial vector lanes for the specified op. The partial vector lanes means the vector size of the op is lower than the MaxVectorSize, hence the higher lanes should be ignored. 
> 
> I agree with your point.  I'v created a JBS (https://bugs.openjdk.org/browse/JDK-8372717) to fix it and will create a patch soon. Thank you so much for the debugging, testing and any input!

@XiaohongGong I already have 2 reproducers for missing load and store optimizations attached to [JDK-8371603](https://bugs.openjdk.org/browse/JDK-8371603).

You should add those 2 tests with IR verification to your PR then. And you should also verify that this patch fixes the issue from [JDK-8371603](https://bugs.openjdk.org/browse/JDK-8371603), and then we can close that one as a duplicate. It is a JDK26 bug, so we should try to fix it soon-ish ;)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/9037#discussion_r2570749497


More information about the hotspot-compiler-dev mailing list