Integrated: 8342498: Add test for Allocation elimination after use as alignment reference by SuperWord
Emanuel Peter
epeter at openjdk.org
Tue Nov 5 11:50:37 UTC 2024
On Mon, 4 Nov 2024 13:13:58 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> There used to be a bug where this happens:
> - SuperWord vectorizes, and picks a field-store as he alignment reference, using a CastP2X on he object pointer.
> - Later, all field loads disappear, and the Allocation of the object is eliminated.
> - The GC code then thinks the CastP2X is part of the GC barrier code... and crashes with wrong assumptions about that part of the IR.
>
> We should obviously not use field-accesses as alignment references for SuperWord. A few other changes have fixed this issue:
> - [JDK-8328544](https://bugs.openjdk.org/browse/JDK-8328544): it disallows any non-array accesses that do not have an int-index. This code was backported and so should on its own fix the issue everywhere. But maybe somebody has the idea and wants to be more smart... allowing such memory accesses without int-indices. For that we should add this regression test.
>
> // We did not find the int_index. Just to be safe, reject this VPointer.
> if (!_has_int_index_after_convI2L) {
> return false;
> }
>
> - Recently, we now only allow memory access to be alignment references if they are actually vectorized... which cannot happen with field stores.
> - Roberto's change with GC barriers also removed the asserting/crashing code. Though I'm not sure if that means the IR is then ok.
>
> **At any rate**: the bug seems **fixed**, but we should add and possibly backport this **regression test** anyway.
This pull request has now been integrated.
Changeset: f62fc484
Author: Emanuel Peter <epeter at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/f62fc4844125cc20a91dc2be39ba05a2d3aca8cf
Stats: 183 lines in 1 file changed: 183 ins; 0 del; 0 mod
8342498: Add test for Allocation elimination after use as alignment reference by SuperWord
Reviewed-by: thartmann, kvn
-------------
PR: https://git.openjdk.org/jdk/pull/21875
More information about the hotspot-compiler-dev
mailing list