8222074: Enhance auto vectorization for x86

Reviewed-by: kvn, vlivanov
This commit is contained in:
Sandhya Viswanathan 2019-05-07 13:33:27 -07:00
parent 0284208ab3
commit 707c30fae6
27 changed files with 1632 additions and 1014 deletions

View file

@ -1353,6 +1353,7 @@ public final class Math {
* @param a the argument whose absolute value is to be determined
* @return the absolute value of the argument.
*/
@HotSpotIntrinsicCandidate
public static int abs(int a) {
return (a < 0) ? -a : a;
}
@ -1370,6 +1371,7 @@ public final class Math {
* @param a the argument whose absolute value is to be determined
* @return the absolute value of the argument.
*/
@HotSpotIntrinsicCandidate
public static long abs(long a) {
return (a < 0) ? -a : a;
}
@ -1394,6 +1396,7 @@ public final class Math {
* @param a the argument whose absolute value is to be determined
* @return the absolute value of the argument.
*/
@HotSpotIntrinsicCandidate
public static float abs(float a) {
return (a <= 0.0F) ? 0.0F - a : a;
}