RFR: 8308606: C2 SuperWord: remove alignment checks when not required [v4]
Emanuel Peter
epeter at openjdk.org
Wed Jun 14 11:32:57 UTC 2023
On Wed, 14 Jun 2023 08:10:51 GMT, Pengfei Li <pli at openjdk.org> wrote:
>> @fg1417 Ok, I will expand the misaligned load-store case for some other data types and test it on my two machines again!
>
> Hi @eme64 , I don't see any problem after going through everything you wrote. But as I'm not an official reviewer and don't have enough confidence on complex changes, I hope someone who is more familiar with this part can have a review.
>
> BTW: Have you generated and run some [_JavaFuzzer_](https://github.com/shipilev/JavaFuzzer) tests for this patch? Based on my personal experience, it's quite helpful for finding hidden bugs in SuperWord or other complex loop optimizations.
>
> And a few more comments on this:
>> 3. We could even create a VectorTransformGraph from a single iteration loop, and try to widen the instructions there. If this succeeds we do not have to unroll before vectorizing. This is essentially a traditional loop vectorizer. Except that we can also run the SuperWord algorith over it first to see if we have already any parallelism in the single iteration loop. And then widen that. This makes it a hybrid vectorizer. Not having to unroll means direct time savings, but also that we could vectorize larger loops in the first place, since we would not hit the node limit for unrolling.
>
> What we are current doing for https://bugs.openjdk.org/browse/JDK-8308994 is like a **traditional loop vectorizer** - it can vectorize loops without unrolling. It can also support **strided accesses** (gather/scatter) with a few updates. But our current implementation is outside SuperWord and for post loops only. Perhaps a **hybrid vectorizer** implemented in SuperWord is a better ideal. We will push our draft patch to GitHub soon for your feedback. Currently I'm finishing some routines before I can push the code. It's expected to be done in a few days.
@pfustc We by default run the fuzzer for a few runs, but I'm running it a bit more now just to get a bit more confidence.
I'm looking forward to your draft PR. Maybe we can work together towards a hybrid-vectorizer. I plan to keep working on SuperWord and vectorization in general.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14096#issuecomment-1591013863
More information about the hotspot-compiler-dev
mailing list