RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v11]
Emanuel Peter
epeter at openjdk.org
Thu Feb 13 17:16:22 UTC 2025
On Thu, 13 Feb 2025 16:43:22 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> The current transformation from the parsed version of min/max to a conditional move to a Max/Min node depends on the conditional move transformation which has its own set of heuristics and while it happens on simple test cases, that's not necessarily the case on all code shapes. I don't think we want to trust it too much.
Well, actually people have tried to improve the conditonal move transformation, and it is really really difficult. It's hard not to get regressions. I'm wondering how much easier it is for min / max. Maybe we have similar limitations, especially with predicting how well branch prediction performs.
You are probably right about type propagation and `Min / Max` being floating nodes.
@rwestrel What do you think about the regressions in the scalar cases of this patch?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20098#issuecomment-2657253439
More information about the core-libs-dev
mailing list