Integrated: 8286177: C2: "failed: non-reduction loop contains reduction nodes" assert failure

Roberto Castañeda Lozano rcastanedalo at openjdk.java.net
Tue May 24 07:23:02 UTC 2022


On Fri, 20 May 2022 09:45:19 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> [JDK-8279622](https://bugs.openjdk.java.net/browse/JDK-8279622) introduced an assertion in the SLP analysis verifying that the examined loop does not contain inconsistent reduction information. The assertion is placed at the beginning of the SLP analysis, and can fail even for loops that are not vectorizable by SLP (and hence without risk of being miscompiled). This is the case for the [reported issue](https://bugs.openjdk.java.net/browse/JDK-8286177) and for many other recent failures triggered by JavaFuzzer-generated test cases. This changeset postpones the assertion to the SLP output phase to ensure that it only fails when the program really risks being miscompiled.
> 
> Given that many transformations can invalidate reduction information (see for example the JBS reports for [JDK-8261147](https://bugs.openjdk.java.net/browse/JDK-8261147), [JDK-8279622](https://bugs.openjdk.java.net/browse/JDK-8279622), and [JDK-8286177](https://bugs.openjdk.java.net/browse/JDK-8286177)), a more fundamental fix would be to remove the possibility of inconsistent reduction information by construction, by running the reduction analysis on-demand. I have filed a [RFE](https://bugs.openjdk.java.net/browse/JDK-8287087) to explore this idea after JDK 19.
> 
> #### Testing
> 
>   - hs-tier1-5 (windows-x64, linux-x64, linux-aarch64, and macosx-x64; debug mode).
>   - Tested that the assertion, in its new placement, would still have caught the bug reported in [JDK-8279622](https://bugs.openjdk.java.net/browse/JDK-8279622) in the original scenario.
>   - Tested that the assertion, in its new placement, does not fail for 27 JavaFuzzer-generated test cases that trigger the assertion in its original placement.

This pull request has now been integrated.

Changeset: 6458a56e
Author:    Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/6458a56e60472fb2fbe8fa60bbc856dc95f50f07
Stats:     67 lines in 2 files changed: 65 ins; 2 del; 0 mod

8286177: C2: "failed: non-reduction loop contains reduction nodes" assert failure

Reviewed-by: chagedorn, kvn

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

PR: https://git.openjdk.java.net/jdk/pull/8805


More information about the hotspot-compiler-dev mailing list