diff options
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/optabs.c | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96fe9c3..31e4d6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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). + 2002-05-19 Mark Mitchell <mitchell@doubledemon.codesourcery.com> * Makefile.in (distclean): Remove QMTest stuff. 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 |
