Integrated: 8310299: C2: 8275201 broke constant folding of array store check in some cases
Roland Westrelin
roland at openjdk.org
Thu Jun 29 07:44:10 UTC 2023
On Mon, 19 Jun 2023 08:56:26 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> Before 8275201, loading the element klass of an array returned:
>
>
> TypeKlassPtr::make(tkls->ptr(), elem, 0/*offset*/);
>
>
> that is exact if the array type is exact. I changed it to:
>
>
> tkls->is_aryklassptr()->elem();
>
>
> When the array type is exact (newly allocated array for instance) but
> the element class has subclasses, this doesn't return an exact class
> (so the logic is different from the one that was there before). That
> affects array store checks that no longer constant fold.
This pull request has now been integrated.
Changeset: be64d3ac
Author: Roland Westrelin <roland at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/be64d3ac3cf9da2658038d64233f080da8011dc8
Stats: 64 lines in 3 files changed: 63 ins; 0 del; 1 mod
8310299: C2: 8275201 broke constant folding of array store check in some cases
Reviewed-by: thartmann, kvn
-------------
PR: https://git.openjdk.org/jdk/pull/14536
More information about the hotspot-compiler-dev
mailing list