RFR: 8314612: TestUnorderedReduction.java fails with -XX:MaxVectorSize=32 and -XX:+AlignVector [v3]
Emanuel Peter
epeter at openjdk.org
Tue Sep 12 12:28:04 UTC 2023
> **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. **Running**
Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
add c2 requires
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/15654/files
- new: https://git.openjdk.org/jdk/pull/15654/files/6c825679..d53ea854
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=15654&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=15654&range=01-02
Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/15654.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15654/head:pull/15654
PR: https://git.openjdk.org/jdk/pull/15654
More information about the hotspot-compiler-dev
mailing list