RFR: 8261308: C2: assert(inner->is_valid_counted_loop(T_INT) && inner->is_strip_mined()) failed: OuterStripMinedLoop should have been removed

Vladimir Kozlov kvn at openjdk.java.net
Thu Feb 25 18:11:53 UTC 2021


On Thu, 25 Feb 2021 09:49:31 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> > Add comment here explaining this case (one trip when init >= limit).
> 
> Ok. Do you still think we need extra tests?

Yes, would be nice to have tests for 0,1,2 iterations and all 3 types of loops: `for() {}`, `while() {}`, `do {} while()` to verify that they are converted to straight code. It could be done as separate RFE.

> 
> > BTW, this optimization seems only works for INT iv loops and not LONG. Do you plan to implement for LONG?
> 
> I thought about it but it's not straightforward because the current code uses long to avoid overflow. I would also like to rework the parallel iv code so it works with LONG loops. I don't have time right now, thought.
> 
> Note also, that because of the iv phi Value(), I would expect some of the single iteration loops to be optimized even without a working IdealLoopTree::compute_trip_count(). That would be true for in and long loops.

Got it. Thank you.

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

PR: https://git.openjdk.java.net/jdk/pull/2529


More information about the hotspot-compiler-dev mailing list