[jdk17] Integrated: 8268884: C2: Compile::remove_speculative_types must iterate top-down
Nils Eliasson
neliasso at openjdk.java.net
Tue Jun 29 18:42:06 UTC 2021
On Tue, 29 Jun 2021 09:25:21 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:
> Hi,
>
> The test fails on "assert(t->meet(t0) == t) failed: Not monotonic" in PhaseCCP for a CheckCastPPNode. The test is really simple. The CheckCastPP is hanging of the ParmNode for the 'this' pointer. The user of this is a call, with an infinite empty loop, that gets inlined. The loop will have a safepoint that keeps the JVM State - the CheckCastPP is kept alive by that SafePointNode.
>
> The assert triggers because the type for the CheckCastPP has a speculative part. In the assert "assert(t->meet(t0) == t) failed: Not monotonic" - t is the type evaluated for the CheckCastPP, t0 is the previous type (from _types map), which has not been updated yet and is still Type::Top.
>
> t->meet(t0) will drop the speculative part and fail the comparison.
>
> Suggested fix - change meet to meet_specualtive that will keep the speculative part.
>
> Please review,
> Best regards,
> Nils Eliasson
This pull request has now been integrated.
Changeset: b8a16e93
Author: Nils Eliasson <neliasso at openjdk.org>
URL: https://git.openjdk.java.net/jdk17/commit/b8a16e931b1dc77dbe537fc5d2127a94ef71c801
Stats: 12 lines in 1 file changed: 4 ins; 0 del; 8 mod
8268884: C2: Compile::remove_speculative_types must iterate top-down
Reviewed-by: roland, kvn
-------------
PR: https://git.openjdk.java.net/jdk17/pull/170
More information about the hotspot-compiler-dev
mailing list