Integrated: 8314580: PhaseIdealLoop::transform_long_range_checks fails with assert "was tested before"
Roland Westrelin
roland at openjdk.org
Mon Sep 4 15:20:56 UTC 2023
On Thu, 24 Aug 2023 07:57:34 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> For long counted loops, `PhaseIdealLoop::create_loop_nest()` first
> goes over the loop body to collect range checks, then transforms the
> long counted loop into a loop nest and then goes over the list of
> range checks it collected to transfrom them. For that last step,
> `PhaseIdealLoop::transform_long_range_checks()` needs to extract the
> parameters of the range check from the range check expression. It
> should still recognize the range check expression even though the loop
> was transformed in the meantime. That's what fails here. The reason is
> that the range check expression uses the long loop increment as input
> which, in the creation of the loop nest, is transformed to `outer
> phi + inner incr`. That breaks pattern matching of the range check
> expression. I propose removing the transformation:
>
>
> incr=>(outer_phi+inner_incr)
>
>
> entireley. After looking at this code again, I don't think it's
> needed. The transformation:
>
>
> phi=>(outer_phi+inner_phi)
>
>
> should be all that's needed to correctly transform the loop.
This pull request has now been integrated.
Changeset: 9def4538
Author: Roland Westrelin <roland at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/9def4538ab5456d689fd289bdef66fd1655773bc
Stats: 52 lines in 2 files changed: 46 ins; 4 del; 2 mod
8314580: PhaseIdealLoop::transform_long_range_checks fails with assert "was tested before"
Reviewed-by: chagedorn, kvn
-------------
PR: https://git.openjdk.org/jdk/pull/15411
More information about the hotspot-compiler-dev
mailing list