This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Mark inputs being ZERO as unlikely __mul in powerpc


Hi,

The patch below marks the case of X or Y being ZERO as unlikely on
powerpc.  This makes no difference to the generated code.  The only
purpose is to sync up the code with the default code.  OK to commit?

Siddhesh

	* sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__mul): Mark X
	or Y being zero as being unlikely.
	* sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__mul):
	Likewise.


diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
index 77eb474..a0f7408 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
@@ -605,7 +605,7 @@ __mul (const mp_no *x, const mp_no *y, mp_no *z, int p)
   double u, zk, zk2;
 
   /* Is z=0?  */
-  if (X[0] * Y[0] == ZERO)
+  if (__glibc_unlikely (X[0] * Y[0] == ZERO))
     {
       Z[0] = ZERO;
       return;
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
index 77eb474..a0f7408 100644
--- a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
+++ b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
@@ -605,7 +605,7 @@ __mul (const mp_no *x, const mp_no *y, mp_no *z, int p)
   double u, zk, zk2;
 
   /* Is z=0?  */
-  if (X[0] * Y[0] == ZERO)
+  if (__glibc_unlikely (X[0] * Y[0] == ZERO))
     {
       Z[0] = ZERO;
       return;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]