From patchwork Wed Jul 1 08:27:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 489943 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4855C1402C0 for ; Wed, 1 Jul 2015 18:27:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=u1esi/dW; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=ANo6plpb8XFqJBG0 MvpDa6CC4uDIgxi1d1FlcmgrpPpbZ+dXuQqKOgOdx+Tf4pRJBLmLwTTl22dEgw6g 24ocyhobzPK5arydEl2JU4G4yZdyAHSUEkx4RFUgOWZjOShqOX+hbprUogQKeWHn XWKauBQXEhItG4hPJpI14D0spcM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=VZOq4KEvEgcEZUSuVlS0kV chFJ8=; b=u1esi/dW8ARaPb8wCocbTz35ziWEnLlUC4y41wBtYWsvMKTI3hGT9b uK1yc4eybQq4JemYBDqIVah0EBgJ+c8tnAnfo8kIeB/4TJ+Bdy5VPkCmzKgjsZLi w8JAvy9JGhwSGJTdylxGFCB7DmAq77bHE9I+eU5TXSa2EJ78CfHhk= Received: (qmail 106707 invoked by alias); 1 Jul 2015 08:27:10 -0000 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 Received: (qmail 106694 invoked by uid 89); 1 Jul 2015 08:27:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 01 Jul 2015 08:27:08 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-2-Cu8H4cIFTcGvMrIrA7EY0g-1 Received: from localhost ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 1 Jul 2015 09:27:03 +0100 From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: PR 66685: parallel returns being misclassified Date: Wed, 01 Jul 2015 09:27:03 +0100 Message-ID: <87h9ponuzs.fsf@e105548-lin.cambridge.arm.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-MC-Unique: Cu8H4cIFTcGvMrIrA7EY0g-1 This patch should restore bootstrap on hppa (and probably other targets besides). The change to use target-insns.def put more stress on the emit()/classify_insn() group of functions, which were missing a case for parallel returns. Tested with a cross-compiler that it fixes the hppa problem. Bootstrap in progress on x86_64-linux-gnu. OK to install? Sorry for the slow response on this one. I'd misread the PR and thought that it was the bug fixed in r225000. Thanks, Richard gcc/ PR bootstrap/66685 * rtl.c (classify_insn): Handle returns in PARALLELs. Index: gcc/rtl.c =================================================================== --- gcc/rtl.c 2015-07-01 09:13:29.782160299 +0100 +++ gcc/rtl.c 2015-07-01 09:13:29.778160333 +0100 @@ -686,6 +686,8 @@ classify_insn (rtx x) for (j = XVECLEN (x, 0) - 1; j >= 0; j--) if (GET_CODE (XVECEXP (x, 0, j)) == CALL) return CALL_INSN; + else if (ANY_RETURN_P (XVECEXP (x, 0, j))) + return JUMP_INSN; else if (GET_CODE (XVECEXP (x, 0, j)) == SET && GET_CODE (SET_DEST (XVECEXP (x, 0, j))) == PC) return JUMP_INSN;