RFR: 8310190: C2 SuperWord: AlignVector is broken, generates misaligned packs [v58]
Emanuel Peter
epeter at openjdk.org
Thu Jan 4 10:42:37 UTC 2024
On Thu, 4 Jan 2024 08:15:58 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/compile.cpp line 1059:
>>
>>> 1057:
>>> 1058: if (AllowVectorizeOnDemand) {
>>> 1059: if (has_method() && _directive->VectorizeOption) {
>>
>> This seems no related. Please explain it.
>
> This is my justification in the PR description:
>
>> Other Details
>>
>> I made VectorizeDebugOption a debug print only flag now. Before this fix, it also had the same effect as VectorizeOption (which ensures that only nodes from the same original pre-unrolling node are packed, preventing hand-unrolled code to be vectorized but enabling some edge cases to be vectorized that would not otherwise vectorize).
>>
>> I added is_trace_align_vector with bit 128, since 64 was recently used for is_trace_loop_reverse, removed with [JDK-8309204](https://bugs.openjdk.org/browse/JDK-8309204).
>>
>> I plan to refactor VectorizeDebugOption soon, as it now has a few subflags / bits that are not used. I may also refactor how TraceSuperWord works in general. Filed [JDK-8317572](https://bugs.openjdk.org/browse/JDK-8317572).
If you really want, then I can not touch `VectorizeDebugOption` at all, i.e. not activate `is_trace_align_vector` with that flag, but instead simply use `TraceSuperWord` (that might be a little verbose though).
I already have the CSR for [JDK-8315361](https://bugs.openjdk.org/browse/JDK-8315361), so that I can remove `VectorizeDebugOption`. This has 2 effects:
1. remove the product effect of `VectorizeDebugOption`, which is the same effect as enabling `VectorizeOption`.
2. introduce a more general auto-vectorization tracing flag that allows more fine-grained control for debug printing.
My idea here was to simply add the alignment tracing to `VectorizeDebugOption`. But currently one cannot enable that tracing without having the side-effects that also `VectorizeOption` has. Hence, I already now remove that product-side effect.
@vnkozlov what do you think?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14785#discussion_r1441592772
More information about the hotspot-compiler-dev
mailing list