RFR: 8298935: fix cyclic dependency bug in create_pack logic in SuperWord::find_adjacent_refs [v15]

Emanuel Peter epeter at openjdk.org
Thu Mar 2 07:13:16 UTC 2023


On Thu, 2 Mar 2023 05:46:11 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   TestDependencyOffsets.java: MulVL not supported on NEON / asimd. Replaced it with AddVL
>
> test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java line 881:
> 
>> 879:     // cpu: sse4.1 to avx -> vector_width: 16 -> elements in vector: 4
>> 880:     // positive byte_offset 4 can lead to cyclic dependency
>> 881:     @IR(counts = {IRNode.LOAD_VECTOR, "> 0", IRNode.MUL_V, "> 0", IRNode.STORE_VECTOR, "> 0"},
> 
> Needs to fix the test generation script. This IR rule looks incorrect since there is a valid dependency with distance 1.

@jatin-bhateja I think the IR rule is just ineffective. I have the following condition in it that will never be met:
`applyIfAnd = {"MaxVectorSize", ">= 8", "MaxVectorSize", "<= 4"},`
The `<= 4` must hold so that `byte_offset <= MaxVectorSize`, and so the cyclical dependency would not happen. But `>= 8` must hold so that two ints fit in a vector, so that we even vectorize.

I could improve the script and filter out such ineffective IR rules. Not sure if that is worth it though.

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

PR: https://git.openjdk.org/jdk/pull/12350


More information about the hotspot-compiler-dev mailing list