RFR(S): 8241475: AArch64: Add missing support for PopCountVI node
Pengfei Li
Pengfei.Li at arm.com
Tue Mar 31 09:32:21 UTC 2020
Hi,
Please help review this another missing node support for AArch64.
JBS: https://bugs.openjdk.java.net/browse/JDK-8241475
Webrev: http://cr.openjdk.java.net/~pli/rfr/8241475/webrev.01/
This adds missing support for C2 node "PopCountVI" for AArch64. This
node is now used on x86 and ppc for the codegen of vectorized bit count
of multiple lanes of ints.
In this AArch64 implementation, CNT instruction is used firstly to get
a per-byte bit count of the NEON register. Then two UADDLP instructions
are used to convert the per-byte counts to per-int counts.
[TESTS]
Jtreg: hotspot::hotspot_all_no_apps, jdk::jdk_core and langtools::tier1.
No new failure found. Intel has already contributed a jtreg case in the
x86 patch [1] for this.
JMH: Tested with a small JMH [2]
Before:
Benchmark Mode Cnt Score Error Units
TestPopCount.testPopCount avgt 15 129.773 ± 36.120 us/op
After:
Benchmark Mode Cnt Score Error Units
TestPopCount.testPopCount avgt 15 41.830 ± 0.068 us/op
Thanks Dmitrij for the suggestion on this patch.
[1] http://hg.openjdk.java.net/jdk/jdk/rev/b242a1e3f9cf
[2] http://cr.openjdk.java.net/~pli/rfr/8241475/TestPopCount.java
--
Thanks,
Pengfei
More information about the hotspot-compiler-dev
mailing list