RFR(S): 8179678: ArrayCopy with same src and dst can cause incorrect execution or compiler crash
rwestrel at redhat.com
Tue May 16 12:22:47 UTC 2017
Thanks for looking a this, Tobias.
> But in ArrayCopyNode::can_replace_dest_load_with_src_load() you return
> false, if src == dst. Why is that?
See test2(): src is the destination of the copy, it is replaced by a
read of the source: src which is the destination of the copy... and
the compiler is sent into an infinite loop.
This said, this test is too conservative. I've reworked it.
> And in line 733, shouldn't we pass must_modify = false to detect the
> case we the array copy _may_ modify the source we would load?
Yes, you're right. Thanks for spotting that.
More information about the hotspot-compiler-dev