RFR: 8275317: AArch64: Support some type conversion vectorization in SLP

Fei Gao duke at openjdk.java.net
Thu Nov 11 02:00:33 UTC 2021


On Wed, 10 Nov 2021 14:21:13 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> That looks good to me but x86 supports vector instructions for these operations as well, right? Or am I missing something?
> 
> https://github.com/openjdk/jdk/blob/55b36c6f3bb7eb066daaf41f9eba46633afedf08/src/hotspot/cpu/x86/x86.ad#L6701
> 
> Do you have perf numbers for x86?

Yes, I got perf data on X86 as showed below:

Before the patch:
  Benchmark              (length)  Mode  Cnt    Score   Error  Units
  VectorLoop.convertD2L       523  avgt   15  527.330 ± 6.159  ns/op
  VectorLoop.convertF2I       523  avgt   15  545.808 ± 4.677  ns/op
  VectorLoop.convertI2F       523  avgt   15  373.227 ± 1.259  ns/op
  VectorLoop.convertL2D       523  avgt   15  869.646 ± 0.183  ns/op

After the patch:
  Benchmark              (length)  Mode  Cnt    Score   Error  Units
  VectorLoop.convertD2L       523  avgt   15  530.785 ± 4.767  ns/op
  VectorLoop.convertF2I       523  avgt   15  545.831 ± 7.576  ns/op
  VectorLoop.convertI2F       523  avgt   15   66.562 ± 2.270  ns/op
  VectorLoop.convertL2D       523  avgt   15  869.510 ± 0.075  ns/op

X86 supports int to FP only, and got performance uplift on convertI2F.  But it has implementation limitation on both FP to integer types and double to long, and got no obvious positive effect on these scenarios.

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

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


More information about the hotspot-compiler-dev mailing list