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

Vladimir Kozlov kvn at openjdk.org
Wed Jan 15 06:34:43 UTC 2025


On Tue, 14 Jan 2025 07:37:20 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> 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.

In case you want to fix test method later or modify it (have separate tests for native and java arrays) I would prefer to have IR testing rule which can say to "skip" (not run) a test without need to comment out it and its rules.
May be with text explaining why test skipped.
You can delete it if you don't want to do that.

>> 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?

See my suggestion.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21926#discussion_r1916008003
PR Review Comment: https://git.openjdk.org/jdk/pull/21926#discussion_r1916008459


More information about the hotspot-compiler-dev mailing list