RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v9]
Galder Zamarreño
galder at openjdk.org
Fri Jan 17 15:31:46 UTC 2025
On Tue, 14 Jan 2025 08:33:36 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Galder Zamarreño has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Make sure it runs with cpus with either avx512 or asimd
>
> test/hotspot/jtreg/compiler/loopopts/superword/MinMaxRed_Long.java line 107:
>
>> 105: int aboveCount, abovePercent;
>> 106:
>> 107: // Iterate until you find a set that matches the requirement probability
>
> Can you give a high-level definition / explanation what this does?
> Also: what is the expected number of rounds you iterate here? I'm asking because I would like to be sure that a timeout is basically impossible because the probability is too low.
Sure I'll add. It's an approximation to make it run fast as sizes increase. In the worst case I've seen it take 15 rounds when size was 100, 50% probability and got 50 below max and 50 above. But with bigger array sizes, say 10'000, and 50% probability aim, it can take 1 or 2 rounds ending up with 5027 above max, 4973 below max.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20098#discussion_r1920359437
More information about the graal-dev
mailing list