RFR: 8331054: C2 MergeStores: assert failed: unexpected basic type after JDK-8318446 and JDK-8329555 [v2]

Tobias Hartmann thartmann at openjdk.org
Wed Apr 24 15:15:40 UTC 2024


On Wed, 24 Apr 2024 15:13:13 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> I just pushed [JDK-8318446](https://bugs.openjdk.org/browse/JDK-8318446), and @jatin-bhateja just pushed a new test with [JDK-8329555](https://bugs.openjdk.org/browse/JDK-8329555).
>> 
>> Note: this is definitely due to the MergeStores logic from [JDK-8318446](https://bugs.openjdk.org/browse/JDK-8318446).
>> With [JDK-8329555](https://bugs.openjdk.org/browse/JDK-8329555), Jatin only added a test that triggers the bug.
>> 
>> Jatin created a test case, where we have an `array pointer`, but its element type is `bottom`, because it merges multiple different arrays. I attached such an example in the regression test:
>> 
>> https://github.com/openjdk/jdk/blob/52877b8d5c0c24c256611ceb9cef1d4fb0c40f68/test/hotspot/jtreg/compiler/c2/TestMergeStores.java#L1275-L1297
>> 
>> The issue is that I assume that array ptr always have a native type. But they can be bottom type, and the BasicType is then T_ILLEGAL, and trying to get the size in bytes leads to the assert.
>> 
>> **Solution:** just check if the BasicTypes are `is_java_primitive(bt)`.
>
> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   whitespace

Looks good to me.

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

Marked as reviewed by thartmann (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18935#pullrequestreview-2020168087


More information about the hotspot-compiler-dev mailing list