[jdk16] Integrated: 8258272: LoadVectorMaskedNode can't be replaced by zero con
Nils Eliasson
neliasso at openjdk.java.net
Wed Jan 13 09:19:04 UTC 2021
On Mon, 11 Jan 2021 22:51:48 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:
> A test fails for this code:
>
> byte [] src = new byte[0];
> byte [] dest = Arrays::copy_of(src);
>
> This is transformed to something like:
> byte [] src = new byte[0];
> byte [] dest = new byte[0];
> System.arraycopy(src, 0, dest, 0, src.lenght());
>
> This causes a problem in LoadNode::Value for the new LoadVectorMasked nodes. LoadNode::Value sees that the load will always load a zero - and will try to replace itself with a zero constant. That doesn't work for the LoadVectorMaskedNodes currently.
>
> This patch adds a check to the zero-optimization to pass on vector types.
>
> This patch is currently missing a new test. Since we are nearing the end of bugfixing in JDK16 I decided to publish the fix first so that any discussion of the fix can be had now.
This pull request has now been integrated.
Changeset: 55675309
Author: Nils Eliasson <neliasso at openjdk.org>
URL: https://git.openjdk.java.net/jdk16/commit/55675309
Stats: 63 lines in 2 files changed: 61 ins; 0 del; 2 mod
8258272: LoadVectorMaskedNode can't be replaced by zero con
Reviewed-by: chagedorn, vlivanov
-------------
PR: https://git.openjdk.java.net/jdk16/pull/105
More information about the hotspot-compiler-dev
mailing list