aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 509d465..c2d7d5f 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -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