RFR: 8303466: C2: failed: malformed control flow. Limit type made precise with MaxL/MinL [v4]
Vladimir Kozlov
kvn at openjdk.org
Mon Apr 17 19:58:58 UTC 2023
On Mon, 17 Apr 2023 14:21:51 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> But I think I can do the same with just collapsing `SubL -> MaxL -> SubL -> MaxL` to `SubL -> MaxL`. That may be cleaner.
I prefer this if you can do it. So you have sequence (after folding `Conv` nodes)
MaxL(SubL(MaxL(SubL(limit, stride), min_int), stride*2), min_int);
Yes, I think it can be collapsed to:
MaxL(SubL(limit, stride*3), min_int);
If in any point of chain `limit` become `min_int` it will stay `min_int` (even if `stride` is `max_int`) because you use Long arithmetic and we have "small" limit on unrolling (16?).
If it does not hit min_int the result it similar to SubL(SubL((limit, stride), stride*2).
So you just need to correctly collect `stride*N` values.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13269#issuecomment-1511996427
More information about the hotspot-compiler-dev
mailing list