aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gnu.org>1994-07-06 07:20:48 +0000
committerTorbjorn Granlund <tege@gnu.org>1994-07-06 07:20:48 +0000
commit515dfc7a237bc1f02b23e12b004937800f21a5a3 (patch)
tree59ad7a001fd90481bb110892690c9a9ae4844484 /gcc
parent9a0e77ba1327661271053585fcc696cbc8215133 (diff)
downloadgcc-515dfc7a237bc1f02b23e12b004937800f21a5a3.zip
gcc-515dfc7a237bc1f02b23e12b004937800f21a5a3.tar.gz
gcc-515dfc7a237bc1f02b23e12b004937800f21a5a3.tar.bz2
(expand_divmod): Clear out TARGET also if OP1 is a constant,
when TARGET == OP0. From-SVN: r7661
Diffstat (limited to 'gcc')
-rw-r--r--gcc/expmed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index f828e7f..e5ff61a 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -2605,7 +2605,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
and function-inlining gets confused by this. */
&& ((REG_P (target) && REG_FUNCTION_VALUE_P (target))
/* Don't clobber an operand while doing a multi-step calculation. */
- || (rem_flag
+ || ((rem_flag || op1_is_constant)
&& (reg_mentioned_p (target, op0)
|| (GET_CODE (op0) == MEM && GET_CODE (target) == MEM)))
|| reg_mentioned_p (target, op1)