RFR: 8257561: Some code is not vectorized after 8251925 and 8250607

Claes Redestad redestad at openjdk.java.net
Thu Dec 3 19:45:56 UTC 2020


On Thu, 3 Dec 2020 17:01:15 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Looks good to me! Thanks for fixing this.
>> 
>> Maybe you could add a comment at JDK-8250607 with the test that was not vectorized anymore in case we want to further investigate and redo the RFE.
>
> Thank you @chhagedorn, @iwanowww, @TobiHartmann for reviews.

FWIW I was playing around with a few naive micros like the following:

    private int[] values; // 500 random integers

    @Benchmark
    public int multiplyFive() {
        int x = 1;
        for (int i : values) {
            x += i * 5;
        }
        return x;
    }
 

and noticed this had gotten 3x slower in 16-b25 on my sandybridge workstation. The patch here recuperates the performance in the micro to levels in 16-b24

Perhaps a micro like that (simple arithmetic in a counted loops which apparently can be aggressively autovectorized) could be somewhat useful as a regression test?

-------------

PR: https://git.openjdk.java.net/jdk/pull/1584


More information about the hotspot-compiler-dev mailing list