RFR: 8286972: Support the new loop induction variable related PopulateIndex IR node on x86 [v3]

Pengfei Li pli at openjdk.java.net
Fri May 20 02:00:46 UTC 2022


On Thu, 19 May 2022 23:34:59 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> This PR adds x86 backend support for the new loop induction variable related PopulateIndex IR node. 
>> This IR node was added as part of [JDK-8280510](https://bugs.openjdk.java.net/browse/JDK-8280510).
>> 
>> The performance numbers are as follows:
>> Before:
>> Benchmark                   (count)   Mode  Cnt       Score       Error  Units
>> IndexVector.exprWithIndex1    65536  thrpt    3   64556.552 ±  1126.396  ops/s
>> IndexVector.exprWithIndex2    65536  thrpt    3   22117.050 ± 11452.098  ops/s
>> IndexVector.indexArrayFill    65536  thrpt    3  117776.383 ±  1120.957  ops/s
>> 
>> After:
>> Benchmark                   (count)   Mode  Cnt       Score       Error  Units
>> IndexVector.exprWithIndex1    65536  thrpt    3  203180.290 ±  2147.807  ops/s
>> IndexVector.exprWithIndex2    65536  thrpt    3  274132.756 ±  6853.393  ops/s
>> IndexVector.indexArrayFill    65536  thrpt    3  374165.202 ± 46930.779  ops/s
>> 
>> Please review.
>> 
>> Best Regards,
>> Sandhya
>
> Sandhya Viswanathan has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - remove warmup
>  - Add jtreg test

test/hotspot/jtreg/compiler/vectorization/TestPopulateIndex.java line 29:

> 27: * @requires vm.compiler2.enabled
> 28: * @requires vm.cpu.features ~= ".*avx2.*"
> 29: * @requires os.arch=="amd64" | os.arch=="x86_64"

Can we simplify `os.arch=="amd64" | os.arch=="x86_64"` to `os.simpleArch == "x64"` ?

This test runs on x86 only. It would be nice if it can run on AArch64 as well. So perhaps something like

 28 * @requires (os.simpleArch == "x64" & vm.cpu.features ~= ".*avx2.*") |
 29 *           (os.simpleArch == "aarch64" & vm.cpu.features ~= ".*sve.*")

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

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


More information about the hotspot-compiler-dev mailing list