From: Torbjorn Granlund Date: Fri, 1 Jul 1994 11:40:45 +0000 (+0000) Subject: (expand_divmod): Put OP0 in a register when computing X-Git-Tag: misc/cutover-egcs-0~6315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab0b65811bd9a0ed2408e16d756c712818d9a8d8;p=thirdparty%2Fgcc.git (expand_divmod): Put OP0 in a register when computing remainder, or when OP1 is constant. From-SVN: r7628 --- diff --git a/gcc/expmed.c b/gcc/expmed.c index 5df018834896..50ebb6747144 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2680,9 +2680,10 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) if (GET_CODE (op1) == MEM && MEM_VOLATILE_P (op1)) op1 = force_reg (compute_mode, op1); -#if 0 - op0 = force_reg (mode, op0); -#endif + /* If we need the remainder or if OP1 is constant, we need to + put OP0 in a register in case it has any queued subexpressions. */ + if (rem_flag || op1_is_constant) + op0 = force_reg (compute_mode, op0); last = get_last_insn ();