From patchwork Wed Oct 31 18:42:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 195986 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 3E7172C00AC for ; Thu, 1 Nov 2012 05:42:54 +1100 (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=1352313775; h=Comment: DomainKey-Signature: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=3YcrE84 Jrh6e54o1pUMbnn6gPx0=; b=O33TfXNFKv3w9P8S8vZ2E6CwEZJB4fFDRPWDuh/ yDJxKesqIVrN8ANezRmvAhsXkIAWQrXRL81paKf45ti2/1B/9Fby7zZYJwj2yZyQ ZA5hg6KyqXdF2xhifwM+G7nvqUyYAl6Ye4u/p9TNDzxYP67EpaodBeorisxZiihc t2ek= 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:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=W5ToUecHuve412oCrSgLwCB38Wxa0poJj/NKOMmoNaxvpCvwGJdHWxXuftatUO CGogdJ8Z5InJymyu5kn+gUNW2tZEBFnXqwD5mw5ayvefB0c5MaUSp+S5SRH4aBYu DMvYb/v7senT3XIpTrufVrMt2/4xZw5IyoK8qU+lpol8k=; Received: (qmail 12061 invoked by alias); 31 Oct 2012 18:42:49 -0000 Received: (qmail 12007 invoked by uid 22791); 31 Oct 2012 18:42:48 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS 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, 31 Oct 2012 18:42:43 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9VIggHZ004318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 31 Oct 2012 14:42:42 -0400 Received: from Mair.local (vpn-10-229.rdu.redhat.com [10.11.10.229]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9VIgf9r010898 for ; Wed, 31 Oct 2012 14:42:42 -0400 Message-ID: <50917121.1000200@redhat.com> Date: Wed, 31 Oct 2012 14:42:41 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: GCC Patches Subject: patch to fix PR55150 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 The following patch fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55150 The patch was successfully bootstrapped on x86/x86-64. Committed as rev. 193042. 2012-10-31 Vladimir Makarov PR middle-end/55150 * lra-constraints.c (lra_constraints): Update debug insn info after equivalence change. 2012-10-31 Vladimir Makarov PR middle-end/55150 * gcc.dg/pr55150.c: New test. Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 193039) +++ lra-constraints.c (working copy) @@ -3343,7 +3343,10 @@ lra_constraints (bool first_p) pseudo to the equivalent value if necessary. */ curr_id = lra_get_insn_recog_data (curr_insn); if (debug_loc_equivalence_change_p (curr_id->operand_loc[0])) - changed_p = true; + { + lra_update_insn_regno_info (curr_insn); + changed_p = true; + } } else if (INSN_P (curr_insn)) { Index: testsuite/gcc.dg/pr55150.c =================================================================== --- testsuite/gcc.dg/pr55150.c (revision 0) +++ testsuite/gcc.dg/pr55150.c (working copy) @@ -0,0 +1,72 @@ +/* PR middle-end/55150 */ +/* { dg-do compile } */ +/* { dg-options "-Os -g" } */ + +typedef unsigned int KEY_TABLE_TYPE[(272 / 4)]; + typedef unsigned int u32; + typedef unsigned char u8; + static const u32 Camellia_SBOX[][256] = { + }; + static const u32 SIGMA[] = { + 0xa09e667f, 0x3bcc908b, 0xb67ae858, 0x4caa73b2, 0xc6ef372f, 0xe94f82be, 0x54ff53a5, 0xf1d36f1c, 0x10e527fa, 0xde682d1d, 0xb05688c2, 0xb3e6c1fd }; + int Camellia_Ekeygen (int keyBitLength, const u8 * rawKey, KEY_TABLE_TYPE k) { + register u32 s0, s1, s2, s3; + k[0] = s0 = ( { + u32 r = *(const u32 *) (rawKey); + r; + } + ); + k[2] = s2 = ( { + u32 r = *(const u32 *) (rawKey + 8); + r; + } + ); + k[3] = s3 = ( { + u32 r = *(const u32 *) (rawKey + 12); + r; + } + ); + if (keyBitLength != 128) { + k[8] = s0 = ( { + u32 r = *(const u32 *) (rawKey + 16); + r; + } + ); + if (keyBitLength == 192) { + k[10] = s2 = ~s0; + k[11] = s3 = ~s1; + } + } + s0 ^= k[0], s1 ^= k[1], s2 ^= k[2], s3 ^= k[3]; + if (keyBitLength == 128) { + k[4] = s0, k[5] = s1, k[6] = s2, k[7] = s3; + } + else { + k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; + s0 ^= k[8], s1 ^= k[9], s2 ^= k[10], s3 ^= k[11]; + do { + register u32 _t0, _t1, _t2, _t3; + _t0 = s2 ^ ((SIGMA + 10))[0]; + _t3 ^= Camellia_SBOX[3][(_t0 >> 8) & 0xff]; + s1 ^= _t3; + } + while (0); + do { + u32 _t0 = s0 >> (32 - 30); + s2 = (s2 << 30) | (s3 >> (32 - 30)); + s3 = (s3 << 30) | _t0; + } + while (0); + k[40] = s0, k[41] = s1, k[42] = s2, k[43] = s3; + k[64] = s1, k[65] = s2, k[66] = s3, k[67] = s0; + s0 = k[8], s1 = k[9], s2 = k[10], s3 = k[11]; + k[36] = s0, k[37] = s1, k[38] = s2, k[39] = s3; + s0 = k[12], s1 = k[13], s2 = k[14], s3 = k[15]; + do { + s1 = (s1 << 15) | (s2 >> (32 - 15)); + } + while (0); + k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; + k[44] = s1, k[45] = s2, k[46] = s3, k[47] = s0; + } + }