8154122: Intrinsify fused mac operations

Added FMA intrinsics on x86

Reviewed-by: kvn, aph, darcy
This commit is contained in:
Vivek Deshpande 2016-08-26 12:20:09 -07:00
parent adf14d8c2d
commit 1a188cf07a
2 changed files with 8 additions and 2 deletions

View File

@ -1626,7 +1626,7 @@ public final class Math {
*
* @since 9
*/
// @HotSpotIntrinsicCandidate
@HotSpotIntrinsicCandidate
public static double fma(double a, double b, double c) {
/*
* Infinity and NaN arithmetic is not quite the same with two
@ -1743,7 +1743,7 @@ public final class Math {
*
* @since 9
*/
// @HotSpotIntrinsicCandidate
@HotSpotIntrinsicCandidate
public static float fma(float a, float b, float c) {
/*
* Since the double format has more than twice the precision

View File

@ -221,6 +221,9 @@ public class FusedMultiplyAddTests {
{Double.MIN_VALUE, -0.0, +0.0,
+0.0},
{1.0+Math.ulp(1.0), 1.0+Math.ulp(1.0), -1.0-2.0*Math.ulp(1.0),
Math.ulp(1.0)*Math.ulp(1.0)},
};
for (double[] testCase: testCases)
@ -344,6 +347,9 @@ public class FusedMultiplyAddTests {
{Float.MAX_VALUE, 2.0f, 1.0f,
InfinityF},
{1.0f+Math.ulp(1.0f), 1.0f+Math.ulp(1.0f), -1.0f-2.0f*Math.ulp(1.0f),
Math.ulp(1.0f)*Math.ulp(1.0f)},
};
for (float[] testCase: testCases)