summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-17 22:45:44 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-17 22:45:44 +0000
commit7deb903c1631c4e908d4297433647cd29f59186c (patch)
tree26be73247b520afd344e309000d58ba414b3ac94
parent551e0cf9e7404a1f53a80675f32ed4dc866eccb6 (diff)
downloadgcc-7deb903c1631c4e908d4297433647cd29f59186c.tar.gz
* doloop.c (doloop_optimize): Extract pattern from insn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54722 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/doloop.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8a17de531c0..aa586a254bd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2002-06-18 Alan Modra <amodra@bigpond.net.au>
+
+ * doloop.c (doloop_optimize): Extract pattern from insn.
+
2002-06-17 Matt Kraai <kraai@alumni.cmu.edu>
* doc/extend.texi (Function Attributes): Remove `,...' from @var.
diff --git a/gcc/doloop.c b/gcc/doloop.c
index dc9ea379734..de59562f6bb 100644
--- a/gcc/doloop.c
+++ b/gcc/doloop.c
@@ -875,11 +875,13 @@ doloop_optimize (loop)
jump instruction. Also, a raw define_insn may yield a plain
pattern. */
doloop_pat = doloop_seq;
- if (INSN_P (doloop_pat) && NEXT_INSN (doloop_pat) != NULL_RTX)
+ if (INSN_P (doloop_pat))
{
while (NEXT_INSN (doloop_pat) != NULL_RTX)
doloop_pat = NEXT_INSN (doloop_pat);
- if (GET_CODE (doloop_pat) != JUMP_INSN)
+ if (GET_CODE (doloop_pat) == JUMP_INSN)
+ doloop_pat = PATTERN (doloop_pat);
+ else
doloop_pat = NULL_RTX;
}