8248830 : RFR[S] : C2 : Rotate API intrinsification for X86

Bhateja, Jatin jatin.bhateja at intel.com
Fri Jul 10 14:04:30 UTC 2020


Hi All,

Following patch adds intrinsification and vectorization support for 4 java APIs:-

  *   Integer.rotateLeft
  *   Integer.rotateRight
  *   Long.rotateLeft
  *   Long.rotateRight

JBS   : https://bugs.openjdk.java.net/browse/JDK-8248830
WebRev: http://cr.openjdk.java.net/~jbhateja/8248830/webrev.01/

AVX512 offers 8 new vector rotate instructions [1], these can accept both immediate and variable rotate count
arguments. Patch exploits both these flavors of instructions.

Following are the benchmarks results

Before:
UseAVX=3
Benchmark                         (SHIFT)  (TESTSIZE)   Mode  Cnt      Score   Error   Units
RotateBenchmark.testRotateLeftI        20        1024  thrpt    2  13336.170          ops/ms
RotateBenchmark.testRotateLeftL        20        1024  thrpt    2   8897.930          ops/ms
RotateBenchmark.testRotateRightI       20        1024  thrpt    2  13447.273          ops/ms
RotateBenchmark.testRotateRightL       20        1024  thrpt    2   8783.535          ops/ms

After:
UseAVX=3
Benchmark                         (SHIFT)  (TESTSIZE)   Mode  Cnt      Score   Error   Units
RotateBenchmark.testRotateLeftI        20        1024  thrpt    2  20438.609          ops/ms
RotateBenchmark.testRotateLeftL        20        1024  thrpt    2  11238.110          ops/ms
RotateBenchmark.testRotateRightI       20        1024  thrpt    2  20306.805          ops/ms
RotateBenchmark.testRotateRightL       20        1024  thrpt    2  11190.639          ops/ms

Kindly review the patch.

Best Regards,
Jatin

[1] : https://www.felixcloutier.com/x86/vprold:vprolvd:vprolq:vprolvq
             https://www.felixcloutier.com/x86/vprord:vprorvd:vprorq:vprorvq




More information about the hotspot-compiler-dev mailing list