RFR: 8293531: C2: some vectorapi tests fail assert "Not monotonic" with flag -XX:TypeProfileLevel=222

Vladimir Kozlov kvn at openjdk.org
Wed Oct 12 01:06:08 UTC 2022


On Tue, 11 Oct 2022 12:19:05 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

> Problem occurs in iterative DF analysis during CCP optimization, meet operations drops the speculative types before converging participating lattice values since [include_speculative argument it receives is always set to false ](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/type.hpp#L231)where as [equality check ](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/phaseX.cpp#L1751) in the failing assertion is performed against original type still carrying the speculative type.
> 
> To fix this, type comparison in the assertion should also be done after stripping the speculative type, with this change intermittent assertion failures in several vector API tests reported in the bug report  are no longer seen.
> 
> Kindly review and share your feedback.
> 
> Best Regards,
> Jatin

Normal testing passed.
Also repeat testing with `-XX:TypeProfileLevel=222` and don't see this issue anymore. `compiler/vectorapi/reshape/TestVectorReinterpret.java` test failed IR verification. But it is not related to these changes.

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

Marked as reviewed by kvn (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10648


More information about the hotspot-compiler-dev mailing list