aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop-doloop.c
diff options
context:
space:
mode:
authorBingfeng Mei <bmei@broadcom.com>2010-07-19 09:18:14 +0000
committerBingfeng Mei <bmei@broadcom.com>2010-07-19 09:18:14 +0000
commit153489fce3719295fa5e93b03512af8fe2c107b4 (patch)
tree97adf2164166d6402d0e329bf597c0ea2e666e05 /gcc/loop-doloop.c
parent7c12672aacb73a64f8a0a28fd91450fb97055ca9 (diff)
2010-07-19 Bingfeng Mei <bmei@broadcom.com>
* ddg.c (create_ddg): Exclude nodes of debug_insn in counting nodes of a loop. * loop-doloop.c (doloop_condition_get): Skip possible debug_insn. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@162300 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-doloop.c')
-rw-r--r--gcc/loop-doloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c
index 47a81edaec9..4f0850b7702 100644
--- a/gcc/loop-doloop.c
+++ b/gcc/loop-doloop.c
@@ -104,11 +104,11 @@ doloop_condition_get (rtx doloop_pat)
if (GET_CODE (pattern) != PARALLEL)
{
rtx cond;
+ rtx prev_insn = prev_nondebug_insn (doloop_pat);
/* We expect the decrement to immediately precede the branch. */
- if ((PREV_INSN (doloop_pat) == NULL_RTX)
- || !INSN_P (PREV_INSN (doloop_pat)))
+ if (prev_insn == NULL_RTX || !INSN_P (prev_insn))
return 0;
cmp = pattern;