From ab0b65811bd9a0ed2408e16d756c712818d9a8d8 Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Fri, 1 Jul 1994 11:40:45 +0000 Subject: [PATCH] (expand_divmod): Put OP0 in a register when computing remainder, or when OP1 is constant. From-SVN: r7628 --- gcc/expmed.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/expmed.c b/gcc/expmed.c index 5df01883489..50ebb674714 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 (); -- 2.30.2