From 4a169b5e5d16879f447e71dfb4de0acfb6e46272 Mon Sep 17 00:00:00 2001 From: jakub Date: Fri, 3 Feb 2012 11:55:29 +0000 Subject: PR rtl-optimization/52092 * loop-unswitch.c (unswitch_single_loop): Call copy_rtx_if_shared on get_iv_value result. * gcc.c-torture/compile/pr52092.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183869 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/loop-unswitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/loop-unswitch.c') diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c index 77524d8bfe3..78da1154299 100644 --- a/gcc/loop-unswitch.c +++ b/gcc/loop-unswitch.c @@ -1,5 +1,5 @@ /* Loop unswitching for GNU compiler. - Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 + Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -367,7 +367,7 @@ unswitch_single_loop (struct loop *loop, rtx cond_checked, int num) fprintf (dump_file, ";; Unswitching loop\n"); /* Unswitch the loop on this condition. */ - nloop = unswitch_loop (loop, bbs[i], cond, cinsn); + nloop = unswitch_loop (loop, bbs[i], copy_rtx_if_shared (cond), cinsn); gcc_assert (nloop); /* Invoke itself on modified loops. */ -- cgit v1.2.1