RFR: 8217869: Add count_leading_zeros utility

Claes Redestad claes.redestad at oracle.com
Mon Jan 28 09:34:58 UTC 2019


Hi,

adding a count_leading_zeros implementation using compiler intrinsics
means a straightforward optimization of RegMask::find_highest_bit. For
platforms lacking intrinsic support a more efficient algorithm is
implemented.

Adding a 64-bit version would be straightforward, but let's do that
when we need it.

Bug:    https://bugs.openjdk.java.net/browse/JDK-8217869
Webrev: http://cr.openjdk.java.net/~redestad/8217869/open.00/

Testing: tier1-3

The xlc changes are untested, so it'd be much appreciated if someone
can run the test on that platform.

Thanks!

/Claes


More information about the hotspot-compiler-dev mailing list