[jdk16] RFR: 8258272: LoadVectorMaskedNode can't be replaced by zero con [v2]
Nils Eliasson
neliasso at openjdk.java.net
Tue Jan 12 16:35:29 UTC 2021
> 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.
Nils Eliasson has updated the pull request incrementally with one additional commit since the last revision:
add test and update fix
-------------
Changes:
- all: https://git.openjdk.java.net/jdk16/pull/105/files
- new: https://git.openjdk.java.net/jdk16/pull/105/files/0fb4aab1..61505336
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk16&pr=105&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk16&pr=105&range=00-01
Stats: 60 lines in 2 files changed: 59 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk16/pull/105.diff
Fetch: git fetch https://git.openjdk.java.net/jdk16 pull/105/head:pull/105
PR: https://git.openjdk.java.net/jdk16/pull/105
More information about the hotspot-compiler-dev
mailing list