* flow.c (flow_find_cross_jump): Don't consider unconditional
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Aug 2001 08:13:00 +0000 (08:13 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Aug 2001 08:13:00 +0000 (08:13 +0000)
        return insns for commoning.

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

gcc/ChangeLog
gcc/flow.c

index e8c7eea..6e5858d 100644 (file)
@@ -1,5 +1,8 @@
 2001-08-21  Richard Henderson  <rth@redhat.com>
 
+       * flow.c (flow_find_cross_jump): Don't consider unconditional
+       return insns for commoning.
+
        * final.c (compute_alignments): Fix typo.
 
        * expmed.c (CODE_FOR_insv, gen_insv): Provide defaults.
index 3177e65..312bab7 100644 (file)
@@ -3484,10 +3484,12 @@ flow_find_cross_jump (mode, bb1, bb2, f1, f2)
      need to be compared for equivalence, which we'll do below.  */
 
   i1 = bb1->end;
-  if (onlyjump_p (i1))
+  if (onlyjump_p (i1)
+      || (returnjump_p (i1) && !side_effects_p (PATTERN (i1))))
     i1 = PREV_INSN (i1);
   i2 = bb2->end;
-  if (onlyjump_p (i2))
+  if (onlyjump_p (i2)
+      || (returnjump_p (i2) && !side_effects_p (PATTERN (i2))))
     i2 = PREV_INSN (i2);
 
   last1 = afterlast1 = last2 = afterlast2 = NULL_RTX;