aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorToon Moene <toon@moene.indiv.nluug.nl>2002-05-20 10:30:03 +0200
committerToon Moene <toon@gcc.gnu.org>2002-05-20 08:30:03 +0000
commitc0fe508e8b201c7789a66f252609a0f9006acfe9 (patch)
tree79c7bff18900074ef2431e2ea0e500148cc0671c /gcc/optabs.c
parentf362c7623d64bd76c85e84b11a46dd2dea45cad5 (diff)
downloadgcc-c0fe508e8b201c7789a66f252609a0f9006acfe9.zip
gcc-c0fe508e8b201c7789a66f252609a0f9006acfe9.tar.gz
gcc-c0fe508e8b201c7789a66f252609a0f9006acfe9.tar.bz2
optabs.c (expand_cmplxdiv_wide): Use complex_part_zero_p.
2002-05-19 Toon Moene <toon@moene.indiv.nluug.nl> * optabs.c (expand_cmplxdiv_wide): Use complex_part_zero_p. (expand_binop): Ditto (3 times). From-SVN: r53655
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 49771df..46b86c5 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -554,7 +554,7 @@ expand_cmplxdiv_wide (real0, real1, imag0, imag1, realr, imagr, submode,
/* Calculate dividend. */
- if (imag0 == 0)
+ if (complex_part_zero_p (imag0, class, submode))
{
/* Compute a / (c+id) as a(c/d) / (c(c/d)+d) + i (-a) / (c(c/d)+d). */
@@ -1553,7 +1553,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
else
real1 = op1;
- if (real0 == 0 || real1 == 0 || ! (imag0 != 0|| imag1 != 0))
+ if (real0 == 0 || real1 == 0 || ! (imag0 != 0 || imag1 != 0))
abort ();
switch (binoptab->code)
@@ -1570,10 +1570,11 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
else if (res != realr)
emit_move_insn (realr, res);
- if (imag0 && imag1)
+ if (!complex_part_zero_p (imag0, class, submode)
+ && !complex_part_zero_p (imag1, class, submode))
res = expand_binop (submode, binoptab, imag0, imag1,
imagr, unsignedp, methods);
- else if (imag0)
+ else if (!complex_part_zero_p (imag0, class, submode))
res = imag0;
else if (binoptab->code == MINUS)
res = expand_unop (submode,
@@ -1593,7 +1594,8 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
case MULT:
/* (a+ib) * (c+id) = (ac-bd) + i(ad+cb) */
- if (imag0 && imag1)
+ if (!complex_part_zero_p (imag0, class, submode)
+ && !complex_part_zero_p (imag1, class, submode))
{
rtx temp1, temp2;
@@ -1656,7 +1658,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
else if (res != realr)
emit_move_insn (realr, res);
- if (imag0 != 0)
+ if (!complex_part_zero_p (imag0, class, submode))
res = expand_binop (submode, binoptab,
real1, imag0, imagr, unsignedp, methods);
else