RFR: 8371146: C2 SuperWord: VTransform::add_speculative_check uses pre_init that is pinned after Auto_Vectorization_Check, leading to bad graph

Emanuel Peter epeter at openjdk.org
Wed Nov 26 14:57:53 UTC 2025


On Wed, 26 Nov 2025 14:35:31 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Right. The ctrl can either be legal (between the early and lates point), or outside it (illegal).
>> 
>> I fear that we do have some illegal ctrl now:
>> Imagine we use some node `n1(n2(n3(...)))`, where all of `n1-3` have ctrl between pre-loop and predicate, but their early is before the predicate. If we now use `n1` at the predicate and update its ctrl to early, then we would actually have to update the ctrl of `n2` and `n3` between early and predicate too, right? The whole expression would have to be moved, otherwise we have inputs that have a later ctrl than its outputs, and that is not right.
>> 
>> The same is true for `is_pre_loop_invariant` with ctrl between inside pre-loop and before pre-loop.
>> 
>> I'm very happy to file even a bug for this. But I'd prefer not to have to do it in this same issue here. Is that ok?
>
> Yes, you are right, the problem/implications are more wide-spread and it's not much better when fixing one place while leaving the other ones in a illegal state. I think you have a better overview over Autovectorization to make an estimate if there are immediate problems with continuing with illegal ctrl or not (sounds like there are none - at least in theory). So, I agree with you to investigate that separately. I think it could also just be part of tackling verification for ctrl in general. You can move ahead with this PR then, thanks for discussing this aspect! :-)

Yes, thanks for bringing it up!
I filed [JDK-8372613](https://bugs.openjdk.org/browse/JDK-8372613). Not sure if it should be an RFE or a bug. Surely not a high-prio bug, but we should look into it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28449#discussion_r2565324638


More information about the hotspot-compiler-dev mailing list