* config/bfin/bfin.c (bfin_optimize_loop): When looking for the last
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Apr 2009 15:40:06 +0000 (15:40 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Apr 2009 15:40:06 +0000 (15:40 +0000)
insn before the loop_end instruction, don't look past labels.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146980 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/bfin/bfin.c

index 8f8e05d..a2d280f 100644 (file)
@@ -3,6 +3,9 @@
        * config/bfin/bfin.c (bfin_optimize_loop): If we need a scratch reg,
        scan backwards to try to find a constant to initialize it.
 
+       * config/bfin/bfin.c (bfin_optimize_loop): When looking for the last
+       insn before the loop_end instruction, don't look past labels.
+
 2009-04-29  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/39937
index 0808522..63f60e1 100644 (file)
@@ -4012,6 +4012,7 @@ bfin_optimize_loop (loop_info loop)
        break;
 
       if (single_pred_p (bb)
+         && single_pred_edge (bb)->flags & EDGE_FALLTHRU
          && single_pred (bb) != ENTRY_BLOCK_PTR)
        {
          bb = single_pred (bb);