From patchwork Tue Mar 28 20:57:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 744529 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 3vt39z02lLz9s7j for ; Wed, 29 Mar 2017 07:57:25 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="jHDjNBgi"; 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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=yTCsoPrE5Ma3NP38zQ59ax47Imalxcd2YW3YJQvGi5BfLchIEz rMylPplPuNzlHkWYXYHjA39cDGLutR3VAdaJP8KPYvzpeaIfM7GIXiH5K9imUyU3 ZEybM7LoNZlGffcK00YqwBd1hlH3xo3y/dmCkMrQNPJ+6I8nWjuA6iN8k= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=Pf+aZfbaS7QSlq2xSYOCMZX2aY4=; b=jHDjNBgifuBcZ970riZi slm/B9FIgvfZo3QIBrctpSofh9QNEh8tmYadGtqPsP45TjJYlvBmEIsBeUPdcLXt ezoxowjXSUzoCYH63nMV+6cNgFMIjNnFjb4HU9Sk6RCXLfir4JJ0FcUTdc6qMQMh qTSkLRKXeBwqBsAYAIRxPPA= Received: (qmail 112178 invoked by alias); 28 Mar 2017 20:57:14 -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 112165 invoked by uid 89); 28 Mar 2017 20:57:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=bj X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Mar 2017 20:57:11 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E6CA7C04BD3B for ; Tue, 28 Mar 2017 20:57:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E6CA7C04BD3B Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=vmakarov@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E6CA7C04BD3B Received: from topor.usersys.redhat.com (unused-10-15-17-214.yyz.redhat.com [10.15.17.214]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACA2275703 for ; Tue, 28 Mar 2017 20:57:10 +0000 (UTC) To: gcc-patches From: Vladimir Makarov Subject: patch to fix PR80193 Message-ID: <1cc5bb6d-7032-ae37-6ca9-4d72dd69219d@redhat.com> Date: Tue, 28 Mar 2017 16:57:10 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 X-IsSubscribed: yes The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80193 The patch was successfully bootstrapped on x86-64. Committed as rev. 246554. Index: ChangeLog =================================================================== --- ChangeLog (revision 246553) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2017-03-28 Vladimir Makarov + + PR rtl-optimization/80193 + * ira.c (ira): Do not check allocation for LRA. + 2017-03-28 Alexander Monakov * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare. Index: ira.c =================================================================== --- ira.c (revision 246536) +++ ira.c (working copy) @@ -5334,7 +5334,6 @@ reg_alternate_class (old_regno), reg_allocno_class (old_regno)); } - } else { @@ -5370,7 +5369,14 @@ calculate_allocation_cost (); #ifdef ENABLE_IRA_CHECKING - if (ira_conflicts_p) + if (ira_conflicts_p && ! ira_use_lra_p) + /* Opposite to reload pass, LRA does not use any conflict info + from IRA. We don't rebuild conflict info for LRA (through + ira_flattening call) and can not use the check here. We could + rebuild this info for LRA in the check mode but there is a risk + that code generated with the check and without it will be a bit + different. Calling ira_flattening in any mode would be a + wasting CPU time. So do not check the allocation for LRA. */ check_allocation (); #endif Index: testsuite/ChangeLog =================================================================== --- testsuite/ChangeLog (revision 246553) +++ testsuite/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2017-03-28 Vladimir Makarov + + PR rtl-optimization/80193 + * gcc.target/i386/pr80193.c: New. + 2017-03-28 Janus Weil PR fortran/78661 Index: testsuite/gcc.target/i386/pr80193.c =================================================================== --- testsuite/gcc.target/i386/pr80193.c (nonexistent) +++ testsuite/gcc.target/i386/pr80193.c (working copy) @@ -0,0 +1,196 @@ +/* { dg-do compile } */ +/* { dg-options "-O3" } */ + +int printf (const char *, ...); + +char a, e, h, ag, ak, am, ar, ay, az, bc, bd, k, l; +int f, i, n, o, c, ac, ad, p, ah, s, aj, al, an, b, ao, aq, at, av, be, t, u, g, q, r, ai, **aa, ap; + +int d (int v) +{ + return v + a; +} + +int j (char v, char w) +{ + return v - w; +} + +void m (int p) +{ +} + +static void bf () +{ + int bg[240], bi, bk, bl, bj, bm = -1; + const int *bh; + if (h) + { + int bn, bo; + while (1) + { + int *bp = &at; + const int **bq = &bh, **br = bq; + while (av) + while (ah) + ; + int bs = r, bt; + if (bt) + break; + bu: + for (; r; r = d (r)) + { + *bp = j (q && b, 0); + if (n) + u = b; + if (u && ak) + p = 0; + } + if (c) + { + while (a) + while (r) + { + int bw = ar, bx = an; + by: + printf ("%d\n", an); + while (ao) + while (bw) + { + a = !g || f / g; + if (i) + az = i; + l = j (q && bh, 5); + if (n != 0) + t = l / n; + if (t) + while (bo) + ; + } + while (a) + ; + if (s) + while (bx) + while (1) + { + if (r) + break; + *aa || q; + } + while (at) + ; + } + while (av) + if (b) + goto by; + while (bl) + while (1) + { + if (r) + break; + while (ag) + if (bi) + printf ("%d\n", 0); + if (bk) + { + bo = bn = bi = printf (""); + goto bz; + } + while (o) + if (a) + { + while (1) + ; + ca: + ; + } + if (ap) + while (1) + ; + while (a) + { + if (ai) + { + bz: + while (be) + if (a) + while (bn) + bl = bg[am]; + while (ac) + if (ad) + { + bj++; + while (bj) + if (c) + goto bu; + } + if (s) + { + while (ao) + while (f) + while (p) + if (e) + while (bj) + for (; bo;) + ; + if (aq) + { + while (aj) + ; + continue; + } + while (1) + ; + } + while (!bj) + { + al = 0; + for (; al < 6; al++) + { + ai = 0; + for (; ai < 60; ai = d (ai)) + { + k = !g || f / g; + if (i) + ay = 0; + bc = j (q && *bq, ay); + if (!n) + ; + else + bd = bc / n; + if (**bq) + __builtin_abort (); + *bp = !aa; + } + while (av) + for (; ai; ai++) + for (; ar; ar++) + { + int cb; + *aa = &cb; + } + m ((long) &br); + while (an) + while (1) + ; + } + } + } + o = b; + } + while (bs) + bm++; + while (bm) + ; + } + } + } + goto ca; + } +} + +int main () +{ + bf (); + return 0; +}