Integrated: 8314612: TestUnorderedReduction.java fails with -XX:MaxVectorSize=32 and -XX:+AlignVector
Emanuel Peter
epeter at openjdk.org
Wed Sep 13 10:50:50 UTC 2023
On Mon, 11 Sep 2023 09:17:46 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> **Problem**
>
> There is a case where `PhaseIdealLoop::move_unordered_reduction_out_of_loop` gets a chain of `UnorderedReduction` which have differing vector lengths. But this can lead to wrong results, as some elements now get dropped or "hallucinated".
>
> Details:
> `-XX:+AlingVector` creates alignment boundaries over which no pack can go. Effectively, it cuts the packs at the alignment boundaries. This can create unexpected series of packs with lengths `[4, 8, 4]`, rather than `[8, 8]`.
>
> **Solution**
>
> We need to check that all `UnorderedReduction` have the same `vect_type()`. That ensures all have the same length and element type.
>
> **Testing**
>
> I converted the old test into scenario `v016-U`, and added scenario `v032-A` (fails without the patch). Also, I added some vanilla scenarios, just to ensure the test cases can be run with other flag combinations. The IR tests are targeted at scenario `v016-U`.
>
> Tests: tier1-6, stress-testing.
This pull request has now been integrated.
Changeset: f804f865
Author: Emanuel Peter <epeter at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/f804f8652da71b18cc654c08c12d07d6fd43c2a7
Stats: 56 lines in 2 files changed: 50 ins; 0 del; 6 mod
8314612: TestUnorderedReduction.java fails with -XX:MaxVectorSize=32 and -XX:+AlignVector
Reviewed-by: chagedorn, kvn
-------------
PR: https://git.openjdk.org/jdk/pull/15654
More information about the hotspot-compiler-dev
mailing list