aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@redhat.com>2001-11-09 23:06:04 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2001-11-09 23:06:04 +0000
commitff6051b76e5f031a6bfc0c1f25a51034df1e4902 (patch)
tree1c401918c7bcbdded039a4ef338ec2822a5c81af /gcc/flow.c
parent322fe6e185b1a4470827b5ffbbda9fb1ecf0ea4b (diff)
downloadgcc-ff6051b76e5f031a6bfc0c1f25a51034df1e4902.zip
gcc-ff6051b76e5f031a6bfc0c1f25a51034df1e4902.tar.gz
gcc-ff6051b76e5f031a6bfc0c1f25a51034df1e4902.tar.bz2
flow.c (insn_dead_p): Allow for AUTO_INC notes all the time.
* flow.c (insn_dead_p): Allow for AUTO_INC notes all the time. In testsuite/: * gcc.c-torture/execute/20011109-2.c: New test. From-SVN: r46901
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 50e7494..fbe570b 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -1892,21 +1892,18 @@ insn_dead_p (pbi, x, call_ok, notes)
enum rtx_code code = GET_CODE (x);
#ifdef AUTO_INC_DEC
- /* If flow is invoked after reload, we must take existing AUTO_INC
- expresions into account. */
- if (reload_completed)
+ /* As flow is invoked after combine, we must take existing AUTO_INC
+ expressions into account. */
+ for (; notes; notes = XEXP (notes, 1))
{
- for (; notes; notes = XEXP (notes, 1))
+ if (REG_NOTE_KIND (notes) == REG_INC)
{
- if (REG_NOTE_KIND (notes) == REG_INC)
- {
- int regno = REGNO (XEXP (notes, 0));
-
- /* Don't delete insns to set global regs. */
- if ((regno < FIRST_PSEUDO_REGISTER && global_regs[regno])
- || REGNO_REG_SET_P (pbi->reg_live, regno))
- return 0;
- }
+ int regno = REGNO (XEXP (notes, 0));
+
+ /* Don't delete insns to set global regs. */
+ if ((regno < FIRST_PSEUDO_REGISTER && global_regs[regno])
+ || REGNO_REG_SET_P (pbi->reg_live, regno))
+ return 0;
}
}
#endif