]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* 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 8f8e05d6f90592f94ac09fed55f3e682da3b5c69..a2d280fd8f1dd23becba9c12a38990fb59a875a5 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 0808522afdfc8d090365b9606964430b442f5728..63f60e1f60c10de80f681d2ec4d049347ae9f55a 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);