]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add some __builtin_expect to generic __ieee754_log
authorUlrich Drepper <drepper@gmail.com>
Fri, 21 Oct 2011 16:28:42 +0000 (12:28 -0400)
committerUlrich Drepper <drepper@gmail.com>
Fri, 21 Oct 2011 16:28:42 +0000 (12:28 -0400)
ChangeLog
sysdeps/ieee754/dbl-64/e_log.c

index b2d629b9532f7e348c8146bb103ffdca0e0c5c5a..404e1fe49c69c5efbb245b971ca396abfca17f90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-21  Ulrich Drepper  <drepper@gmail.com>
+
+       * sysdeps/ieee754/dbl-64/e_log.c (__ieee754_log): Add a few more
+       __builtin_expect.
+
 2011-10-20  Ulrich Drepper  <drepper@gmail.com>
 
        * sysdeps/i386/configure.in: Test for -mfma4 option.
index 5d320db994295466062e109959a4f15831a0a3c5..0fc6f920a63eefad63bc9e13a6e3a6cd316107a8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * IBM Accurate Mathematical Library
  * written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -68,7 +68,7 @@ double __ieee754_log(double x) {
 
   num.d = x;  ux = num.i[HIGH_HALF];  dx = num.i[LOW_HALF];
   n=0;
-  if (ux < 0x00100000) {
+  if (__builtin_expect(ux < 0x00100000, 0)) {
     if (__builtin_expect(((ux & 0x7fffffff) | dx) == 0, 0))
       return MHALF/ZERO; /* return -INF */
     if (__builtin_expect(ux < 0, 0))
@@ -82,7 +82,7 @@ double __ieee754_log(double x) {
   /* Regular values of x */
 
   w = x-ONE;
-  if (ABS(w) > U03) { goto case_03; }
+  if (__builtin_expect(ABS(w) > U03, 1)) { goto case_03; }
 
 
   /*--- Stage I, the case abs(x-1) < 0.03 */