aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-07-01 06:45:56 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-07-01 06:45:56 -0400
commite9c1141151358c5713eefd54d900a816db88fa22 (patch)
tree674ba4b39a2bfc7a842db29eab73d79aa11cb087 /gcc/expmed.c
parent353646926a7db50095f541f3c33847c617b227bb (diff)
downloadgcc-e9c1141151358c5713eefd54d900a816db88fa22.zip
gcc-e9c1141151358c5713eefd54d900a816db88fa22.tar.gz
gcc-e9c1141151358c5713eefd54d900a816db88fa22.tar.bz2
(expand_divmod): Don't set REG_NOTES unless we generated a quotient.
From-SVN: r7627
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index ee16ed4..5df0188 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -2920,11 +2920,14 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
}
}
- insn = get_last_insn ();
- REG_NOTES (insn)
- = gen_rtx (EXPR_LIST, REG_EQUAL,
- gen_rtx (DIV, compute_mode, op0, op1),
- REG_NOTES (insn));
+ if (quotient != 0)
+ {
+ insn = get_last_insn ();
+ REG_NOTES (insn)
+ = gen_rtx (EXPR_LIST, REG_EQUAL,
+ gen_rtx (DIV, compute_mode, op0, op1),
+ REG_NOTES (insn));
+ }
}
break;
}