RFR: 8343685: C2 SuperWord: refactor VPointer with MemPointer [v4]

Emanuel Peter epeter at openjdk.org
Tue Jan 14 07:40:44 UTC 2025


On Mon, 13 Jan 2025 20:12:22 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 116 commits:
>> 
>>  - copyright 2025
>>  - Merge branch 'master' into JDK-8343685-VPointer-MemPointer
>>  - manual merge
>>  - fix printing
>>  - rename
>>  - fix up print
>>  - add TestEquivalentInvariants.java
>>  - improve documentation
>>  - hide parser via delegation
>>  - Merge branch 'master' into JDK-8343685-VPointer-MemPointer
>>  - ... and 106 more: https://git.openjdk.org/jdk/compare/84e6432b...b64f9295
>
> test/hotspot/jtreg/compiler/loopopts/superword/TestMemorySegment.java line 655:
> 
>> 653:     // FAILS: invariants are sorted differently, because of differently inserted Cast.
>> 654:     // See: JDK-8330274
>> 655:     // Interestingly, it now passes for native, but not for objects.
> 
> Should we list new success conditions instead of just commenting old?

I cannot make good conditions currently, sadly.
IR `applyIf` can rely on VM flags, CPU features etc.

But in my case, it would pass for `native` memory, but not for `array` cases. And that is decided by the test command line arguments of the runs. It gets passed in like `-DmemorySegmentProviderNameForTestVM=Native` or `-DmemorySegmentProviderNameForTestVM=ByteArray` etc.

This one is array, and for some reason does not currently parse pointers sufficiently well to vectoirze:
` * @run driver compiler.loopopts.superword.TestMemorySegment ByteArray`
But this is native, and vectorizes:
` * @run driver compiler.loopopts.superword.TestMemorySegment Native`

@vnkozlov @chhagedorn is there any way I can currently do an `applyIf` for that?

I could remove the IR rule rather than comment if, if that is better for you.

> test/hotspot/jtreg/compiler/loopopts/superword/TestMemorySegment.java line 674:
> 
>> 672:     // FAILS: invariants are sorted differently, because of differently inserted Cast.
>> 673:     // See: JDK-8330274
>> 674:     // Interestingly, it now passes for native, but not for objects.
> 
> The same.  May be skip these 2 tests.

What do you mean by skip? Remove the IR rule rather than comment it out?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21926#discussion_r1914369689
PR Review Comment: https://git.openjdk.org/jdk/pull/21926#discussion_r1914369953


More information about the hotspot-compiler-dev mailing list