diff options
author | Dale Johannesen <dalej@gcc.gnu.org> | 2002-09-17 21:25:13 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@gcc.gnu.org> | 2002-09-17 21:25:13 +0000 |
commit | ac19be7ebaaa65f6bf5df62db247a57dc41dde57 (patch) | |
tree | fcba97f4d21d11195b6b6ea9b77267956a1a7048 /gcc/cfgcleanup.c | |
parent | 6a0225133cef7f6181a0b656e4952dadce25751b (diff) | |
download | gcc-ac19be7ebaaa65f6bf5df62db247a57dc41dde57.tar.gz |
Do not foward a branch to just after a loop exit before
loop optimization; this broke doloop detection.
From-SVN: r57260
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index f6a011ad51e..fe221036b99 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -515,6 +515,15 @@ try_forward_edges (mode, b) if (GET_CODE (insn) == NOTE) break; + + /* Do not clean up branches to just past the end of a loop + at this time; it can mess up the loop optimizer's + recognition of some patterns. */ + + insn = PREV_INSN (target->head); + if (insn && GET_CODE (insn) == NOTE + && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END) + break; } counter++; |