RFR(S): fix System.arraycopy() C2 intrinsics with arrays of value types
Tobias Hartmann
tobias.hartmann at oracle.com
Mon Nov 27 13:57:08 UTC 2017
Hi Roland,
On 27.11.2017 14:08, Roland Westrelin wrote:
> copy_type is set to dest_elem and is returned from the method so it's
> not that simple, right?
Right, my bad.
> I hit that problem when running the new tests with -Xcomp. In the
> address computation of:
>
> src[i-1]
>
> the constant part is negative (header size + (-1) * field offset).
Okay, makes sense.
> I think the problem was:
>
> when converting an arraycopy to a series of loads/stores, the memory
> state is a MergeMem mm,
>
> first load a value, without the change, memory edge is mm
>
> store the value, memory state is one of the input of mm, mm is updated
> to point to the store
>
> and we have a cycle:
>
> ST->LD->MM-\
> ^----------/
Thanks for the explanation! Maybe rename "m" to "load_mem" or something more informative.
No need to send another webrev assuming that you've executed the relevant hotspot tests.
Best regards,
Tobias
More information about the valhalla-dev
mailing list