aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgloopmanip.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-11-03 09:49:16 +0000
committerJakub Jelinek <jakub@redhat.com>2010-11-03 09:49:16 +0000
commit3c2ffff578d153cc6dff03a2c06990884a4bdb61 (patch)
tree7b8b7d7ad30b46e210beddd0a1730b34001839c7 /gcc/cfgloopmanip.c
parent8f7e5ec06709173206c4817d3e7fbfa962419cfb (diff)
PR tree-optimization/46107
* cfgloopmanip.c (loop_version): Set irred_flag back into entry->flags if cfg_hook_duplicate_loop_to_header_edge failed. * gcc.c-torture/compile/pr46107.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@166234 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloopmanip.c')
-rw-r--r--gcc/cfgloopmanip.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index 4363cc51f64..aa9ab66454e 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -1,6 +1,6 @@
/* Loop manipulation code for GNU compiler.
- Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -1538,7 +1538,10 @@ loop_version (struct loop *loop,
/* Duplicate loop. */
if (!cfg_hook_duplicate_loop_to_header_edge (loop, entry, 1,
NULL, NULL, NULL, 0))
- return NULL;
+ {
+ entry->flags |= irred_flag;
+ return NULL;
+ }
/* After duplication entry edge now points to new loop head block.
Note down new head as second_head. */