PR middle-end/41360
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Sep 2009 15:04:06 +0000 (15:04 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Sep 2009 15:04:06 +0000 (15:04 +0000)
        * cfgbuild.c (find_bb_boundaries): Re-instate 2009-09-02 barrier fix.

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

gcc/ChangeLog
gcc/cfgbuild.c

index c8d8846..706f3e2 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-16  Richard Henderson  <rth@redhat.com>
+
+       PR middle-end/41360
+       * cfgbuild.c (find_bb_boundaries): Re-instate 2009-09-02 barrier fix.
+
 2009-09-16  Jakub Jelinek  <jakub@redhat.com>
 
        * integrate.c (set_block_abstract_flags): Call
index b5ddadd..5744108 100644 (file)
@@ -477,9 +477,17 @@ find_bb_boundaries (basic_block bb)
          if (code == CODE_LABEL && LABEL_ALT_ENTRY_P (insn))
            make_edge (ENTRY_BLOCK_PTR, bb, 0);
        }
-
-      if (control_flow_insn_p (insn))
+      else if (code == BARRIER)
+       {
+         /* __builtin_unreachable () may cause a barrier to be emitted in
+            the middle of a BB.  We need to split it in the same manner as
+            if the barrier were preceded by a control_flow_insn_p insn.  */
+         if (!flow_transfer_insn)
+           flow_transfer_insn = prev_nonnote_insn_bb (insn);
+       }
+      else if (control_flow_insn_p (insn))
        flow_transfer_insn = insn;
+
       if (insn == end)
        break;
       insn = NEXT_INSN (insn);