RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v4]
Galder Zamarreño
galder at openjdk.org
Fri Mar 7 06:19:04 UTC 2025
On Tue, 17 Dec 2024 16:40:01 GMT, Galder Zamarreño <galder at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/intrinsics/math/TestMinMaxInlining.java line 80:
>>
>>> 78: @IR(phase = { CompilePhase.BEFORE_MACRO_EXPANSION }, counts = { IRNode.MIN_L, "1" })
>>> 79: @IR(phase = { CompilePhase.AFTER_MACRO_EXPANSION }, counts = { IRNode.MIN_L, "0" })
>>> 80: private static long testLongMin(long a, long b) {
>>
>> Can you add a comment why it disappears after macro expansion?
>
> ~Good question. On non-avx512 machines after macro expansion the min/max nodes become cmov nodes, but but that's not the full story because on avx512 machines, they become minV/maxV nodes. Would you tweak the `@IR` annotations to capture this? Or would you leave it just as a comment?~
>
> Scratch that, this is not a test for arrays, so no minV/maxV nodes. I'll just add a comment.
I've added a comment
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20098#discussion_r1984510490
More information about the core-libs-dev
mailing list