[PATCHv2,02/11] Unify drift between _Complex function type variants

Message ID de2f111cd3a264efdadf17b163ac1e844e6c24bf.1467403875.git.murphyp@linux.vnet.ibm.com
State Committed
Delegated to: Joseph Myers
Headers

Commit Message

Paul E. Murphy July 1, 2016, 8:13 p.m. UTC
  While trying to convert the _Complex function wrappers
into a single generic implementation, a few minor
variations between identical versions emerged.

	* s_ccoshf.c (__ccoshf): Remove FE_INVALID
	check, and remove __glibc_likely hint
	from FP_INFINITE check.
	* s_csinhf.c (__csinhf): Likewise.

	* s_ccoshl.c (__ccoshl): Remove __glibc_likely
	hint from FP_INFINITE check.
	* s_csinhl.c (__csinhl): Likewise.
---
 math/s_ccoshf.c | 4 +---
 math/s_ccoshl.c | 2 +-
 math/s_csinhf.c | 4 +---
 math/s_csinhl.c | 4 +---
 4 files changed, 4 insertions(+), 10 deletions(-)
  

Comments

Joseph Myers Aug. 2, 2016, 9:34 p.m. UTC | #1
On Fri, 1 Jul 2016, Paul E. Murphy wrote:

> While trying to convert the _Complex function wrappers
> into a single generic implementation, a few minor
> variations between identical versions emerged.
> 
> 	* s_ccoshf.c (__ccoshf): Remove FE_INVALID
> 	check, and remove __glibc_likely hint
> 	from FP_INFINITE check.
> 	* s_csinhf.c (__csinhf): Likewise.
> 
> 	* s_ccoshl.c (__ccoshl): Remove __glibc_likely
> 	hint from FP_INFINITE check.
> 	* s_csinhl.c (__csinhl): Likewise.

This patch is OK.
  
Paul E. Murphy Aug. 3, 2016, 5:13 p.m. UTC | #2
On 07/01/2016 03:13 PM, Paul E. Murphy wrote:
> While trying to convert the _Complex function wrappers
> into a single generic implementation, a few minor
> variations between identical versions emerged.
> 
> 	* s_ccoshf.c (__ccoshf): Remove FE_INVALID
> 	check, and remove __glibc_likely hint
> 	from FP_INFINITE check.
> 	* s_csinhf.c (__csinhf): Likewise.
> 
> 	* s_ccoshl.c (__ccoshl): Remove __glibc_likely
> 	hint from FP_INFINITE check.
> 	* s_csinhl.c (__csinhl): Likewise.
> ---

Committed as f2de695.
  

Patch

diff --git a/math/s_ccoshf.c b/math/s_ccoshf.c
index 610a749..d572b76 100644
--- a/math/s_ccoshf.c
+++ b/math/s_ccoshf.c
@@ -94,7 +94,7 @@  __ccoshf (__complex__ float x)
 	    feraiseexcept (FE_INVALID);
 	}
     }
-  else if (__glibc_likely (rcls == FP_INFINITE))
+  else if (rcls == FP_INFINITE)
     {
       /* Real part is infinite.  */
       if (__glibc_likely (icls > FP_ZERO))
@@ -128,10 +128,8 @@  __ccoshf (__complex__ float x)
 	  __real__ retval = HUGE_VALF;
 	  __imag__ retval = __nanf ("") + __nanf ("");
 
-#ifdef FE_INVALID
 	  if (icls == FP_INFINITE)
 	    feraiseexcept (FE_INVALID);
-#endif
 	}
     }
   else
diff --git a/math/s_ccoshl.c b/math/s_ccoshl.c
index 680da3a..d38f0aa 100644
--- a/math/s_ccoshl.c
+++ b/math/s_ccoshl.c
@@ -94,7 +94,7 @@  __ccoshl (__complex__ long double x)
 	    feraiseexcept (FE_INVALID);
 	}
     }
-  else if (__glibc_likely (rcls == FP_INFINITE))
+  else if (rcls == FP_INFINITE)
     {
       /* Real part is infinite.  */
       if (__glibc_likely (icls > FP_ZERO))
diff --git a/math/s_csinhf.c b/math/s_csinhf.c
index a0458cf..36b42ca 100644
--- a/math/s_csinhf.c
+++ b/math/s_csinhf.c
@@ -111,7 +111,7 @@  __csinhf (__complex__ float x)
 	    }
 	}
     }
-  else if (__glibc_likely (rcls == FP_INFINITE))
+  else if (rcls == FP_INFINITE)
     {
       /* Real part is infinite.  */
       if (__glibc_likely (icls > FP_ZERO))
@@ -147,10 +147,8 @@  __csinhf (__complex__ float x)
 	  __real__ retval = HUGE_VALF;
 	  __imag__ retval = __nanf ("") + __nanf ("");
 
-#ifdef FE_INVALID
 	  if (icls == FP_INFINITE)
 	    feraiseexcept (FE_INVALID);
-#endif
 	}
     }
   else
diff --git a/math/s_csinhl.c b/math/s_csinhl.c
index d7f03fa..c231d7b 100644
--- a/math/s_csinhl.c
+++ b/math/s_csinhl.c
@@ -111,7 +111,7 @@  __csinhl (__complex__ long double x)
 	    }
 	}
     }
-  else if (__glibc_likely (rcls == FP_INFINITE))
+  else if (rcls == FP_INFINITE)
     {
       /* Real part is infinite.  */
       if (__glibc_likely (icls > FP_ZERO))
@@ -147,10 +147,8 @@  __csinhl (__complex__ long double x)
 	  __real__ retval = HUGE_VALL;
 	  __imag__ retval = __nanl ("") + __nanl ("");
 
-#ifdef FE_INVALID
 	  if (icls == FP_INFINITE)
 	    feraiseexcept (FE_INVALID);
-#endif
 	}
     }
   else