/* 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). */
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)
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,
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;
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