]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Don't handle BBs with more than 2 preds or succs.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 May 2010 16:46:39 +0000 (16:46 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 May 2010 16:46:39 +0000 (16:46 +0000)
2010-05-26  Sebastian Pop  <sebastian.pop@amd.com>

* tree-if-conv.c (if_convertible_bb_p): Don't handle BBs with more
than 2 predecessors or more than 2 successors.

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

gcc/ChangeLog
gcc/tree-if-conv.c

index 6a4bac37677f13a6ae949974ab7f6012f05ee127..657e1e2610265e9788f7252db76335790b40a9ae 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-26  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * tree-if-conv.c (if_convertible_bb_p): Don't handle BBs with more
+       than 2 predecessors or more than 2 successors.
+
 2010-05-26  Sebastian Pop  <sebastian.pop@amd.com>
 
        * tree-if-conv.c (if_convertible_loop_p): Avoid if-conversion
index f5247a35ee79238be43f5863086a5bce98a1ca84..0c2e96fe71ab249a8f70fd6bca02fc26a0a57acd 100644 (file)
@@ -460,6 +460,10 @@ if_convertible_bb_p (struct loop *loop, basic_block bb, basic_block exit_bb)
   if (dump_file && (dump_flags & TDF_DETAILS))
     fprintf (dump_file, "----------[%d]-------------\n", bb->index);
 
+  if (EDGE_COUNT (bb->preds) > 2
+      || EDGE_COUNT (bb->succs) > 2)
+    return false;
+
   if (exit_bb)
     {
       if (bb != loop->latch)