Use glibc_likely instead __builtin_expect.
[jlayton/glibc.git] / math / s_cexp.c
index dcb3228b995fb3d8f4c091fab385186a90571ae7..a636e35dc48c39e8b580e4b410f100a25ba0280d 100644 (file)
@@ -30,16 +30,16 @@ __cexp (__complex__ double x)
   int rcls = fpclassify (__real__ x);
   int icls = fpclassify (__imag__ x);
 
-  if (__builtin_expect (rcls >= FP_ZERO, 1))
+  if (__glibc_likely (rcls >= FP_ZERO))
     {
       /* Real part is finite.  */
-      if (__builtin_expect (icls >= FP_ZERO, 1))
+      if (__glibc_likely (icls >= FP_ZERO))
        {
          /* Imaginary part is finite.  */
          const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
          double sinix, cosix;
 
-         if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+         if (__glibc_likely (icls != FP_SUBNORMAL))
            {
              __sincos (__imag__ x, &sinix, &cosix);
            }
@@ -97,10 +97,10 @@ __cexp (__complex__ double x)
          feraiseexcept (FE_INVALID);
        }
     }
-  else if (__builtin_expect (rcls == FP_INFINITE, 1))
+  else if (__glibc_likely (rcls == FP_INFINITE))
     {
       /* Real part is infinite.  */
-      if (__builtin_expect (icls >= FP_ZERO, 1))
+      if (__glibc_likely (icls >= FP_ZERO))
        {
          /* Imaginary part is finite.  */
          double value = signbit (__real__ x) ? 0.0 : HUGE_VAL;
@@ -115,7 +115,7 @@ __cexp (__complex__ double x)
            {
              double sinix, cosix;
 
-             if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+             if (__glibc_likely (icls != FP_SUBNORMAL))
                {
                  __sincos (__imag__ x, &sinix, &cosix);
                }