Integrated: 8339733: C2: some nodes can have incorrect control after do_range_check()

Roland Westrelin roland at openjdk.org
Thu Sep 12 07:23:09 UTC 2024


On Mon, 9 Sep 2024 08:27:20 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> PhaseIdealLoop::do_range_check() sets the control of the new pre and
> main limits to be the entry control of the pre loop but it eliminates
> all conditions whose parameters are invariant in the main loop. Most
> of the time they are also invariant in the pre loop but that's not
> guaranteed. It does happen sometimes that those parameters are pinned
> in the pre loop. In that case, PhaseIdealLoop::do_range_check() sets
> wrong controls.
> 
> This doesn't cause any issue today AFAICT.
> 
> Also, this seems to be a typo in PhaseIdealLoop::insert_pre_post_loops():
> 
> 
> pre_head->in(0)
> 
> 
> is `pre_head`. I fixed that one too.

This pull request has now been integrated.

Changeset: 315abdf8
Author:    Roland Westrelin <roland at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/315abdf8c835e95d9c509f72b7ae21e6b59e4a29
Stats:     86 lines in 2 files changed: 63 ins; 0 del; 23 mod

8339733: C2: some nodes can have incorrect control after do_range_check()

Reviewed-by: chagedorn, thartmann

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

PR: https://git.openjdk.org/jdk/pull/20908


More information about the hotspot-compiler-dev mailing list