aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1993-05-05 17:34:48 -0600
committerJeff Law <law@gcc.gnu.org>1993-05-05 17:34:48 -0600
commit36a9c2e959284ad91b7266a2ab188e90b6460090 (patch)
tree41127013820dc7e8b7c81b6bf4330ba750ed86ac /gcc
parent194c082fed560df8e159d72303bdd10c77c109ea (diff)
downloadgcc-36a9c2e959284ad91b7266a2ab188e90b6460090.zip
gcc-36a9c2e959284ad91b7266a2ab188e90b6460090.tar.gz
gcc-36a9c2e959284ad91b7266a2ab188e90b6460090.tar.bz2
combine.c (combinable_i3pat): Do not make REG_DEAD notes for the stack pointer, frame pointer or arg pointer.
* combine.c (combinable_i3pat): Do not make REG_DEAD notes for the stack pointer, frame pointer or arg pointer. From-SVN: r4345
Diffstat (limited to 'gcc')
-rw-r--r--gcc/combine.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index cd5936d..66375ff 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1043,9 +1043,18 @@ combinable_i3pat (i3, loc, i2dest, i1dest, i1_not_in_src, pi3dest_killed)
return 0;
/* If DEST is used in I3, it is being killed in this insn,
- so record that for later. */
+ so record that for later.
+ Never add REG_DEAD notes for the FRAME_POINTER_REGNUM or the
+ STACK_POINTER_REGNUM, since these are always considered to be
+ live. Similarly for ARG_POINTER_REGNUM if it is fixed. */
if (pi3dest_killed && GET_CODE (dest) == REG
- && reg_referenced_p (dest, PATTERN (i3)))
+ && reg_referenced_p (dest, PATTERN (i3))
+ && REGNO (dest) != FRAME_POINTER_REGNUM
+#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
+ && (REGNO (dest) != ARG_POINTER_REGNUM
+ || ! fixed_regs [REGNO (dest)])
+#endif
+ && REGNO (dest) != STACK_POINTER_REGNUM)
{
if (*pi3dest_killed)
return 0;