RFR: 8298935: fix independence bug in create_pack logic in SuperWord::find_adjacent_refs [v15]
Fei Gao
fgao at openjdk.org
Tue Mar 14 01:40:11 UTC 2023
On Mon, 6 Mar 2023 17:46:12 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>>> do you really see any value in generating tests for synthetic vector sizes where MaxVectorSize is a non-power of two. Lets remove them to reduce noise ?
>>
>> I see a value in having non-power of 2 offsets, yes. They should vectorize if the vector width is small enough. And then there are some values like `18, 20, 192` that are a there to check vectorization with `+AlignVector`, where we expect vectorization only if we have `byte_offset % vector_width == 0`. So it is interesting to have some non-power-of-2 values that have various power-of-2 factors in them.
>>
>> Maybe you find the `MaxVectorSize <= 12` "noisy" somehow, because it is equivalent to `MaxVectorSize <= 8`? I find it rather helpful, because `12` reflects the `byte_offset`, and so makes the rule a bit more understandable.
>>
>> Finally, I generate many tests, I don't want to do that by hand. So maybe the rules are not simplified perfectly. I tried to improve it a bit. If you have a concrete idea how to further improve, I'm open for suggestions. I could for example round down the values to the next power of 2, or something like that. But again: would that really make the rules more understandable?
>
>> > With +AlignVector behavior with and without Vectorize,true pragma should match.
>>
>> This was about example with `fArr[i + 4] = fArr[i];` in the loop. `byte_offset = 4 * 4 = 16`.
>>
>> @jatin-bhateja I am not sure what you are trying to say, what do you mean by `should match`?
>>
>
> Yes, this was a bug in mainline where we were incorrectly vectorizing which is now fixed with your changes, just wanted to get that point highlighted.
> @jatin-bhateja Under `aarch64`, I have made bad experiences with `SuperWordMaxVectorSize`. It is not properly adjusted to be at most `MaxVectorSize`. For example if the `aarch64` machine only supports `MaxVectorSize <= 32`, but I set `SuperWordMaxVectorSize = 64`, then it will keep it at `64`. So then my IR rules fail. For the `x86 / x64` machines we have:
>
> https://github.com/openjdk/jdk/blob/33bec207103acd520eb99afb093cfafa44aecfda/src/hotspot/cpu/x86/vm_version_x86.cpp#L1314-L1333
>
> @fg1417 Would you like to implement this for `aarch64`?
@eme64 thanks for pointing it out! I'll take a look at it.
-------------
PR: https://git.openjdk.org/jdk/pull/12350
More information about the hotspot-compiler-dev
mailing list