On Thu, 19 Mar 2026 07:12:56 GMT, Emanuel Peter <[email protected]> wrote:
>> 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. @eme64 Make sense! I have filed [JDK-8380424](https://bugs.openjdk.org/browse/JDK-8380424), I think we can fix this issue there, and we can examine some special handling done before, and fix all discovered missing identity optimizations. I have a prototype already. For this PR, I improved the test code and tested it 100 times, and all the tests passed. WDYT? ------------- PR Comment: https://git.openjdk.org/jdk/pull/28313#issuecomment-4088313828
