RFR: 8310190: C2 SuperWord: AlignVector is broken, generates misaligned packs [v58]

Vladimir Kozlov kvn at openjdk.org
Thu Jan 4 16:39:38 UTC 2024


On Thu, 4 Jan 2024 10:39:11 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

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

I missed that in your long description ;^)
I agree with your suggestion. The option was indeed strange: mixing prints with affects on code.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14785#discussion_r1442000827


More information about the hotspot-compiler-dev mailing list