From patchwork Wed Nov 24 08:59:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 72819 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 16D07B70AA for ; Wed, 24 Nov 2010 19:59:48 +1100 (EST) Received: (qmail 14531 invoked by alias); 24 Nov 2010 08:59:43 -0000 Received: (qmail 14523 invoked by uid 22791); 24 Nov 2010 08:59:43 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 24 Nov 2010 08:59:37 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAO8xaIS005640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Nov 2010 03:59:36 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAO8xZWK031797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Nov 2010 03:59:35 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id oAO8xYew021756; Wed, 24 Nov 2010 09:59:34 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id oAO8xYDQ021754; Wed, 24 Nov 2010 09:59:34 +0100 Date: Wed, 24 Nov 2010 09:59:34 +0100 From: Jakub Jelinek To: "H.J. Lu" Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix up maybe_cleanup_end_of_block (PR middle-end/46629) Message-ID: <20101124085934.GB29412@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20101122220027.GR29412@tyan-ft48-01.lab.bos.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Tue, Nov 23, 2010 at 04:51:35PM -0800, H.J. Lu wrote: Committed as obvious, will deal with the testcase later. 2010-11-24 Jakub Jelinek PR middle-end/46629 * cfgexpand.c (maybe_cleanup_end_of_block): Test NEXT_INSN (insn) instead of insn with any_condjump_p. Jakub --- gcc/cfgexpand.c.jj 2010-11-23 16:14:44.000000000 +0100 +++ gcc/cfgexpand.c 2010-11-24 02:03:52.225261091 +0100 @@ -1695,7 +1695,7 @@ maybe_cleanup_end_of_block (edge e, rtx insn = PREV_INSN (insn); if (JUMP_P (NEXT_INSN (insn))) { - if (!any_condjump_p (insn)) + if (!any_condjump_p (NEXT_INSN (insn))) { gcc_assert (BARRIER_P (NEXT_INSN (NEXT_INSN (insn)))); delete_insn (NEXT_INSN (NEXT_INSN (insn)));