summaryrefslogtreecommitdiff
path: root/mul.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2005-10-07 16:30:45 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2005-10-07 16:30:45 +0000
commit4b8dee9c9ed517f15940be10e338eafe947fb542 (patch)
tree5f1be18d39b10a8bc6e034efafdb73fd4d783532 /mul.c
parentb91c683f5b66585136008823cd86ee1c4152829f (diff)
downloadmpfr-4b8dee9c9ed517f15940be10e338eafe947fb542.tar.gz
Temporary optimization (patch from Patrick Pelissier).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3883 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mul.c')
-rw-r--r--mul.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mul.c b/mul.c
index e34238478..0a3cbc93b 100644
--- a/mul.c
+++ b/mul.c
@@ -350,7 +350,9 @@ mpfr_mul (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode)
}
else
#endif
- if (MPFR_UNLIKELY (bn > MPFR_MUL_THRESHOLD))
+ /* Mulder mulhigh. Disable if squaring, since it is not tuned for
+ such a case */
+ if (MPFR_UNLIKELY (bn > MPFR_MUL_THRESHOLD && b != c))
{
mp_limb_t *bp, *cp;
mp_size_t n;