Integrated: 8288883: C2: assert(allow_address || t != T_ADDRESS) failed after JDK-8283091

Fei Gao fgao at openjdk.org
Mon Jul 18 05:58:49 UTC 2022


On Wed, 6 Jul 2022 07:51:01 GMT, Fei Gao <fgao at openjdk.org> wrote:

> Superword doesn't vectorize any nodes of non-primitive types and
> thus sets `allow_address` false when calling type2aelembytes() in
> SuperWord::data_size()[1]. Therefore, when we try to resolve the
> data size for a node of T_ADDRESS type, the assertion in
> type2aelembytes()[2] takes effect.
> 
> We try to resolve the data sizes for node s and node t in the
> SuperWord::adjust_alignment_for_type_conversion()[3] when type
> conversion between different data sizes happens. The issue is,
> when node s is a ConvI2L node and node t is an AddP node of
> T_ADDRESS type, type2aelembytes() will assert. To fix it, we
> should filter out all non-primitive nodes, like the patch does
> in SuperWord::adjust_alignment_for_type_conversion(). Since
> it's a failure in the mid-end, all superword available platforms
> are affected. In my local test, this failure can be reproduced
> on both x86 and aarch64. With this patch, the failure can be fixed.
> 
> Apart from fixing the bug, the patch also adds necessary type check
> and does some clean-up in SuperWord::longer_type_for_conversion()
> and VectorCastNode::implemented().
> 
> [1]https://github.com/openjdk/jdk/blob/dddd4e7c81fccd82b0fd37ea4583ce1a8e175919/src/hotspot/share/opto/superword.cpp#L1417
> [2]https://github.com/openjdk/jdk/blob/b96ba19807845739b36274efb168dd048db819a3/src/hotspot/share/utilities/globalDefinitions.cpp#L326
> [3]https://github.com/openjdk/jdk/blob/dddd4e7c81fccd82b0fd37ea4583ce1a8e175919/src/hotspot/share/opto/superword.cpp#L1454

This pull request has now been integrated.

Changeset: 87340fd5
Author:    Fei Gao <fgao at openjdk.org>
Committer: Ningsheng Jian <njian at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/87340fd5408d89d9343541ff4fcabde83548a598
Stats:     116 lines in 5 files changed: 89 ins; 9 del; 18 mod

8288883: C2: assert(allow_address || t != T_ADDRESS) failed after JDK-8283091

Reviewed-by: kvn, mdoerr

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

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


More information about the hotspot-compiler-dev mailing list