From patchwork Mon May 21 21:37:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 160485 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 D2823B6EF3 for ; Tue, 22 May 2012 07:37:46 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1338241067; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=b1Bx426 8/MjUyAfLUSxTTxx97uY=; b=wNHHWhv5/QplAbO9nCGCrVtbZ2QyWESXSKUYTid t9SQK/4R05pRjfc5YTbmw8O80AyLkNV+jTqnKT3jb7ay4NCkBhcUN/JT25IclnCc wZ0RN4rVHie9so93nWshCKUqPmDrdZ0Q+pOryRNgqijp3kjfIoO32aSB6hi+raxt RjSc= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=K3+fGy6RvvJ32N21OwBWdkpdg7irLZcXpO6OW539Tmv7FkBlaJXvsgJVnxE9lY 8d5TbcBXxlI9ETe+K5F+Zwpcj/Fcx25ylyp7TtECfVQVw5Dn6zaDC8zaarZN7RBI oOPaLcnXWa16RrTfsdlVy/etrNwWdMOKIw9q9hhIf0bgo=; Received: (qmail 21232 invoked by alias); 21 May 2012 21:37:42 -0000 Received: (qmail 21222 invoked by uid 22791); 21 May 2012 21:37:41 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL, BAYES_00, FROM_12LTRDOM, KHOP_RCVD_UNTRUST, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 May 2012 21:37:29 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SWaIC-0005Tr-5G from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Mon, 21 May 2012 14:37:28 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 21 May 2012 14:37:27 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Mon, 21 May 2012 22:37:25 +0100 Message-ID: <4FBAB58E.6010308@codesourcery.com> Date: Mon, 21 May 2012 23:37:18 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.4) Gecko/20120507 Thunderbird/10.0.4 MIME-Version: 1.0 To: GCC Patches Subject: Fix PR53373 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 This is an ICE due to using single_set on a somewhat unconventional call pattern. To fix it, I've borrowed code from dse.c which was mentioned in the PR. Bootstrapped & tested on x86_64-linux and committed. Bernd Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 187744) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,9 @@ +2012-05-21 Bernd Schmidt + + PR rtl-optimization/53373 + * caller-save.c (save_call_clobbered_regs): Look into a possible + PARALLEL manually rather than using single_set on a call insn. + 2012-05-21 Jakub Jelinek PR tree-optimization/53436 Index: gcc/caller-save.c =================================================================== --- gcc/caller-save.c (revision 187744) +++ gcc/caller-save.c (working copy) @@ -872,11 +872,13 @@ save_call_clobbered_regs (void) && HARD_REGISTER_P (cheap) && TEST_HARD_REG_BIT (call_used_reg_set, REGNO (cheap))) { - rtx call_set = single_set (insn); - rtx dest = SET_DEST (call_set); - rtx pat = gen_rtx_SET (VOIDmode, cheap, - copy_rtx (dest)); - chain = insert_one_insn (chain, 0, -1, pat); + rtx dest, newpat; + rtx pat = PATTERN (insn); + if (GET_CODE (pat) == PARALLEL) + pat = XVECEXP (pat, 0, 0); + dest = SET_DEST (pat); + newpat = gen_rtx_SET (VOIDmode, cheap, copy_rtx (dest)); + chain = insert_one_insn (chain, 0, -1, newpat); } } last = chain;