flow.c (flow_find_cross_jump): Don't consider unconditional return insns for commoning.
authorRichard Henderson <rth@redhat.com>
Wed, 22 Aug 2001 08:13:00 +0000 (01:13 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 22 Aug 2001 08:13:00 +0000 (01:13 -0700)
        * flow.c (flow_find_cross_jump): Don't consider unconditional
        return insns for commoning.

From-SVN: r45101

gcc/ChangeLog
gcc/flow.c

index e8c7eea29a924dc9cc0fad01b3e63eb60be52120..6e5858db2836511019984837950516d735f1ee25 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 3177e65729f21f06ead32abe6e563acd4482ed40..312bab75eba652bb1fcc167ce5b7771d4e1ff70c 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;