From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10001 invoked by alias); 17 Sep 2011 07:18:29 -0000 Received: (qmail 9982 invoked by uid 22791); 17 Sep 2011 07:18:28 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gw0-f51.google.com (HELO mail-gw0-f51.google.com) (74.125.83.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Sep 2011 07:18:07 +0000 Received: by gwj17 with SMTP id 17so4626231gwj.10 for ; Sat, 17 Sep 2011 00:18:06 -0700 (PDT) Received: by 10.150.209.18 with SMTP id h18mr199795ybg.430.1316243886026; Sat, 17 Sep 2011 00:18:06 -0700 (PDT) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id r12sm793138ybi.16.2011.09.17.00.18.03 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 17 Sep 2011 00:18:05 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id AD2D3170C2BC; Sat, 17 Sep 2011 16:47:59 +0930 (CST) Date: Sat, 17 Sep 2011 08:22:00 -0000 From: Alan Modra To: gcc-patches@gcc.gnu.org, Bernd Schmidt Subject: PowerPC shrink-wrap support 1 of 3 Message-ID: <20110917071759.GU10321@bubble.grove.modra.org> Mail-Followup-To: gcc-patches@gcc.gnu.org, Bernd Schmidt References: <20110917071643.GT10321@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110917071643.GT10321@bubble.grove.modra.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg01006.txt.bz2 This obvious patch extends my 2011-08-03 fix to simple_return. Necessary for the same reason as the original patch, namely that rs6000.md has a peephole2 that matches and recreates a conditional jump. With the third patch in this series applied, rs6000 will start to use simple_return in conditional jumps. Even though I think this patch meets the "obvious" requirement, I won't apply it without the other two since the assert may trigger on mips without the second patch in this series. PR rtl-optimization/49941 * jump.c (mark_jump_label_1): Set JUMP_LABEL for simple_return jumps. diff -urp -x.svn -x'*~' -x'*.orig' gcc-bernd/gcc/jump.c gcc-current/gcc/jump.c --- gcc-bernd/gcc/jump.c 2011-09-16 11:52:14.000000000 +0930 +++ gcc-current/gcc/jump.c 2011-09-16 09:59:39.000000000 +0930 @@ -1086,6 +1086,7 @@ mark_jump_label_1 (rtx x, rtx insn, bool return; case RETURN: + case SIMPLE_RETURN: if (is_target) { gcc_assert (JUMP_LABEL (insn) == NULL || JUMP_LABEL (insn) == x); @@ -1408,7 +1409,7 @@ redirect_exp_1 (rtx *loc, rtx olabel, rt int i; const char *fmt; - if ((code == LABEL_REF && XEXP (x, 0) == olabel) + if ((code == LABEL_REF && XEXP (x, 0) == olabel) || x == olabel) { x = redirect_target (nlabel); -- Alan Modra Australia Development Lab, IBM