8279508: Auto-vectorize Math.round API

Reviewed-by: sviswanathan, aph
This commit is contained in:
Jatin Bhateja 2022-04-02 18:00:33 +00:00
parent c1e67b6603
commit 003ec21f3c
25 changed files with 765 additions and 90 deletions

View file

@ -753,6 +753,7 @@ public final class Math {
* @see java.lang.Integer#MAX_VALUE
* @see java.lang.Integer#MIN_VALUE
*/
@IntrinsicCandidate
public static int round(float a) {
int intBits = Float.floatToRawIntBits(a);
int biasedExp = (intBits & FloatConsts.EXP_BIT_MASK)
@ -802,6 +803,7 @@ public final class Math {
* @see java.lang.Long#MAX_VALUE
* @see java.lang.Long#MIN_VALUE
*/
@IntrinsicCandidate
public static long round(double a) {
long longBits = Double.doubleToRawLongBits(a);
long biasedExp = (longBits & DoubleConsts.EXP_BIT_MASK)