From patchwork Fri Jan 11 10:20:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1023480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-493841-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="SY7zzfp+"; dkim-atps=neutral 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 43bf5q3SYVz9sCh for ; Fri, 11 Jan 2019 21:21:02 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=NrqP24wB972OsqnvyY4+5GX6FytcVNHTUbAncxejCbt LIxY3r+Y4PaO9/mazvTsu3uvReZhllYl071aTXFyhC+c/YcZZnK9QZu8sXnpb+oh ip3C+B+eA4NEIo/xB8WlAKEmyySb9LCJxmyR9rzBYTfhfyvNSxb7UNhXJWdIJveU = 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:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=H3hqjnP10CpvKjpINKDUlLCWcBM=; b=SY7zzfp+qJqU1k25I VhwjzoqC8Xua2ru7vEXCM3Y/9JHe3jj80/6W5ePHpFjqZeJzu5l4Qx23FzcVV6bU 98ickbiKmp2tT4bBY1D6sIz+C4RIUyPO8vYZXzkJwOaZ1RLI5qs6YaG35Kgs2YOF COyJXt6sbA8KcLxOEko0LLi0Ns= Received: (qmail 75767 invoked by alias); 11 Jan 2019 10:20:55 -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 75749 invoked by uid 89); 11 Jan 2019 10:20:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.4 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=g, dg-warning, dgwarning, c 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; Fri, 11 Jan 2019 10:20:52 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 666897E44E for ; Fri, 11 Jan 2019 10:20:51 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09DE31000049 for ; Fri, 11 Jan 2019 10:20:50 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x0BAKmOP011889 for ; Fri, 11 Jan 2019 11:20:49 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x0BAKmQL011888 for gcc-patches@gcc.gnu.org; Fri, 11 Jan 2019 11:20:48 +0100 Date: Fri, 11 Jan 2019 11:20:48 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Add testcase for already fixed (or latent) PR rtl-optimization/88296 Message-ID: <20190111102048.GI30353@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi! As mentioned in the PR, this is a LRA hang introduced with the r266422 IRA costs change and which went away with r266862 IRA costs change. Tested on x86_64-linux and i686-linux plus tested with older cc1 from end of November where it timeouts, committed to trunk as obvious. 2019-01-11 Jakub Jelinek PR rtl-optimization/88296 * gcc.target/i386/pr88296.c: New test. Jakub --- gcc/testsuite/gcc.target/i386/pr88296.c.jj 2019-01-11 11:13:43.016941274 +0100 +++ gcc/testsuite/gcc.target/i386/pr88296.c 2019-01-11 11:14:14.558421497 +0100 @@ -0,0 +1,66 @@ +/* PR rtl-optimization/88296 */ +/* { dg-do compile { target int128 } } */ +/* { dg-options "-O2 -march=core2 -fnon-call-exceptions -fschedule-insns -fselective-scheduling -funroll-all-loops -fno-caller-saves -fno-guess-branch-probability -fno-ivopts -fno-rerun-cse-after-loop -fno-split-wide-types -fno-tree-bit-ccp -fno-tree-coalesce-vars --param max-completely-peeled-insns=13" } */ + +int a, b, c; +void bar (int, int); + +void +foo (__int128 x, unsigned int y, char z) +{ + __int128 *d = &x; + unsigned short int e = 0; + unsigned char f = 0; + char g = 1; + (void) d; + bar (0, 0); + while (e < 1) + { + __int128 h = 1; + ++c; + e = x; + g /= e; + if (g != 0) + { + int i; + if (g == 0) + i = a; + else + { + ++g; + i = g; + } + if (i == 0) + { + a -= b + (!!g ? y : 0); + break; + } + for (g = 0; g < 3; ++g) + { + unsigned char *j = &f; + x /= h; + h /= x; + for (i = 0; i < 2; ++i) + { + z <<= ((!!g && !!c) ? (b + 1) : (1 / *j)); + y = ~e; + g &= y; + x |= 1; + b *= i; + ++c; + } + f /= b > 1; + e /= f; + x += b << 32; /* { dg-warning "left shift count" } */ + } + if (g << g == 0) + { + e *= b + 1; + a = 32; + f += (e << a) + (y && 1); + x = z; + c += x / 3; + } + } + } +}