RFR: 8319372: C2 compilation fails with "Bad immediate dominator info" [v2]

Christian Hagedorn chagedorn at openjdk.org
Thu Nov 30 07:17:07 UTC 2023


On Wed, 29 Nov 2023 13:25:41 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> > However, there was still this [test](https://bugs.openjdk.org/secure/attachment/101741/Reduced2.java)
> > ```
> > $ java -Xcomp -XX:CompileOnly=Reduced*::* -XX:-TieredCompilation Reduced2.java
> > ```
> > 
> > 
> >     
> >       
> >     
> > 
> >       
> >     
> > 
> >     
> >   
> > which fails with mainline today but would work with your fix. You might want to add this test case as well.
> 
> I looked at this one and it indeed looks like some variation of the same problem (range checks are eliminated by range check elimination and not predication). I added it.

Nice, thanks!

> > Maybe we need to step through all the reported test cases which we closed as duplicates of [JDK-8275202](https://bugs.openjdk.org/browse/JDK-8275202) at some point and see if this patch can fix them as well. I have the feeling that it can.
> 
> Yes, that would make sense.

Sounds good. I think I will do that and also file a new bug to re-link all of the duplicates of JDK-8275202 to it. Then we could revert it back to an RFE which I think it should be if you agree (it was just a nice side effect that it also fixed the linked bugs).
 
> > Additionally, we might want to investigate separately at some point if this patch allows us to relax some of the constraints of `try_sink_out_of_loop()` which we added fix these kind of issues with `CastII` nodes. I'm not sure though how much benefit it will bring.
> 
> This too makes sense to me.

I will file an additional RFE while at it.
 
> > Anyway, the fix looks good to me!
> 
> Thanks for the review!

The update looks good!

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

PR Comment: https://git.openjdk.org/jdk/pull/16844#issuecomment-1833224989


More information about the hotspot-compiler-dev mailing list