summaryrefslogtreecommitdiffstats
path: root/gcc/loop-unswitch.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-27 19:51:17 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-27 19:51:17 +0000
commiteed31a1178e92a2e5f024e099ff884dfc7bd24ff (patch)
treec1ac3d0e9b92e39c461d328f289b2cec68f64955 /gcc/loop-unswitch.c
parentd67c9ae038e5880159d906e1edcfc0120bfa4e00 (diff)
downloadppe42-gcc-eed31a1178e92a2e5f024e099ff884dfc7bd24ff.tar.gz
ppe42-gcc-eed31a1178e92a2e5f024e099ff884dfc7bd24ff.zip
PR opt/13159
* cfgloopanal.c (mark_irreducible_loops): Fix the strongly connected components detection. * loop-unswitch.c (unswitch_loop): Preserve simple preheaders. * gcc.c-torture/compile/20031227-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75174 138bc75d-0d04-0410-961f-82ee72b054a4
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