On Thu, 12 Mar 2026 06:48:40 GMT, Eric Fang <[email protected]> wrote:

>> Hmm, what do @XiaohongGong @jatin-bhateja @iwanowww think about this? Where 
>> should we add the vector nodes to the worklist? What is the best design, so 
>> we can ensure IGVN always performs all the optimizations, no matter the 
>> inlining order?
>
> Hi @eme64 @jatin-bhateja @iwanowww 
> 
> I’m currently facing a design choice in this PR. The PR run into a test 
> failure and there are a couple of different ways to address the issue, and 
> I’m not sure which direction would be preferable for the project. When you 
> have a moment, could you please share your thoughts on which solution you 
> think is more appropriate? Your guidance would be very helpful to move this 
> PR forward.
> 
> The following solutions can all solve the test failure in this PR.
> 1. Add the use of `VectorMaskCastNode` to igvn worklist in the 
> `PhaseRemoveUseless`, like 
> [[1]](https://github.com/openjdk/jdk/pull/24674/changes/BASE..1b9c3b363fcc296956663249ef95d60a26a704d2#r2058061667).
>  This is a special handling. We can remove this special handling in a follow 
> up patch to address this general issue.
> 2. Add some kind of general fix to this issue in this PR.
> 2.1.  Add **all vector nodes** to the igvn worklist in **PhaseVector**, after 
> box/unbox elimination. See my previous 
> [explanation](https://github.com/openjdk/jdk/pull/24674/changes/BASE..1b9c3b363fcc296956663249ef95d60a26a704d2#issuecomment-4001928595)
>  and 
> [test](https://github.com/openjdk/jdk/pull/24674/changes/BASE..1b9c3b363fcc296956663249ef95d60a26a704d2#issuecomment-3996562890)
>  on this.
> 2.2. Add **all nodes (the whole live nodes)** to the igvn worklist in 
> **PhaseVector**, after box/unbox elimination. I expect the result to be not 
> much different from 2.1.
> 3. Any other solution ?

@erifan I think adding all nodes might be the most reliable in the long-run. We 
may at some point have idealization rules that start at a scalar node, and 
traverse up to find vector nodes.

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

PR Comment: https://git.openjdk.org/jdk/pull/28313#issuecomment-4088271086

Reply via email to