summaryrefslogtreecommitdiffstats
path: root/gcc/loop-unswitch.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/loop-unswitch.c')
-rw-r--r--gcc/loop-unswitch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c
index f276b7307a4..25728c2bf62 100644
--- a/gcc/loop-unswitch.c
+++ b/gcc/loop-unswitch.c
@@ -402,5 +402,9 @@ unswitch_loop (struct loops *loops, struct loop *loop, basic_block unswitch_on)
fix_loop_placement (loop);
fix_loop_placement (nloop);
+ /* Preserve the simple loop preheaders. */
+ loop_split_edge_with (loop_preheader_edge (loop), NULL_RTX, loops);
+ loop_split_edge_with (loop_preheader_edge (nloop), NULL_RTX, loops);
+
return nloop;
}
OpenPOWER on IntegriCloud