RFR: 8303466: C2: failed: malformed control flow. Limit type made precise with MaxL/MinL
Emanuel Peter
epeter at openjdk.org
Tue Apr 11 07:39:33 UTC 2023
On Mon, 10 Apr 2023 18:43:00 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>If we have several unrolls we will have chain of MaxL/MinL nodes. Will the chain be folded by IGVN?
@vnkozlov I fear it would not fold currently. The CMove would not fold before either, but with repeated unrolling, the CMove was reused, and so there was only ever a single CMove (unless some RC got in between).
I think in many cases, the type does not underflow, and the `MaxL/MinL` can be removed completely.
However, if that does not work, I think it now also fails to remove the repeated `ConvI2L / ConvL2I`. We would have to add more IGVN optimizations to fold things more.
I think the performance impact is now insignificant, if it does not fold. Because the limits are only calculated once per loop. We can still improve the folding, if you want. I can also do that in a follow-up RFE, and try to add some IR tests that target type-limit underflow, and count the `MaxL/MinL` nodes.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13269#issuecomment-1502838643
More information about the hotspot-compiler-dev
mailing list