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
This commit is contained in:
parent
f362c7623d
commit
c0fe508e8b
2 changed files with 13 additions and 6 deletions
|
@ -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.
|
||||
|
|
14
gcc/optabs.c
14
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
|
||||
|
|
Loading…
Add table
Reference in a new issue