From 8a09a7e5f129f312f63cbf5982019747741fc4a2 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 17 Jun 2002 22:45:44 +0000 Subject: [PATCH] * doloop.c (doloop_optimize): Extract pattern from insn. From-SVN: r54722 --- gcc/ChangeLog | 4 ++++ gcc/doloop.c | 6 ++++-- 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 + + * doloop.c (doloop_optimize): Extract pattern from insn. + 2002-06-17 Matt Kraai * 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; }