OSDN Git Service

* gcse.c (bypass_block): Prevent edges to be unified when we are
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Jan 2004 14:13:35 +0000 (14:13 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Jan 2004 14:13:35 +0000 (14:13 +0000)
about to emit compenstation code.

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

gcc/ChangeLog
gcc/gcse.c

index 01dea5c..b29c3f3 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-28  Jan Hubicka  <jh@suse.cz>
+
+       * gcse.c (bypass_block): Prevent edges to be unified when we are
+       about to emit compenstation code.
+
 2004-01-28  Nick Clifton  <nickc@redhat.com>
 
        * config/arm/arm.c (arm_expand_builtin): Force second argument of
index 509d465..c2d7d5f 100644 (file)
@@ -4874,6 +4874,21 @@ bypass_block (basic_block bb, rtx setcc, rtx jump)
          else
            dest = NULL;
 
+         /* Avoid unification of the edge with other edges from original
+            branch.  We would end up emitting the instruction on "both"
+            edges.  */
+           
+         if (dest && setcc && !CC0_P (SET_DEST (pat)))
+           {
+             edge e2;
+             for (e2 = e->src->succ; e2; e2 = e2->succ_next)
+               if (e2->dest == dest)
+                 {
+                   dest = NULL;
+                   break;
+                 }
+           }
+
          old_dest = e->dest;
          if (dest != NULL
              && dest != old_dest