RFR: 8301630: C2: 8297933 broke type speculation in some cases

Roland Westrelin roland at openjdk.org
Mon Feb 6 14:04:53 UTC 2023


On Thu, 2 Feb 2023 14:07:40 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> compiler/intrinsics/unsafe/AllocateUninitializedArray.java fails with -XX:TypeProfileLevel=222

The reason for that failure is that speculation sees an array type that is exact but of element type top which makes little sense. I added a test case. That happens when an array of some integer type is casted to some other integer type (int[] and short[] in the test case). The result should not be an exact array. I propose fixing `TypePtr::meet_aryptr()` to address that issue:  I tweaked the "Integral array element types" so it follows the "Non integral arrays."

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

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


More information about the hotspot-compiler-dev mailing list