From patchwork Mon Jan 15 22:04:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 861091 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-471311-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="NAxcH3mS"; 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 3zL6pF2S6Tz9sNV for ; Tue, 16 Jan 2018 09:04:34 +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:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=U8WhfN2xQnsl5RJdTRCGg+uXbKfL4 UV3Sh/ejWFNy7rlGuWzPLbt3UDsMMQA3RaRn/nSpQCO/VqKLNd5vyJnOrVb0FnNi zcRcTACI6vc2Lv0z1upWv2ZsIekCur4nqAjZlG1rpm83/h4u0fCwwzTfZgDtPo+w 5ZUEKn+7c4A/Os= 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:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=CXoqenVyJc9lwipk2ZVpmXr4JHo=; b=NAx cH3mSxmK3BP8GuUO1JPLjh/Gsu87yVunqSpHMTXaSCjQ0f54Hzx4QLygX5pH4tK5 RcctBg7kYQlAvMOJ2Chl/3VppRkJYyC5wjCw/NPYcfJ39OoFamIvnUgwwsZl+Pof /AiWz6F2ZxtyZUQ1KIMANd4enKaDZ3u/Ffa4onnw= Received: (qmail 90309 invoked by alias); 15 Jan 2018 22:04:26 -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 90295 invoked by uid 89); 15 Jan 2018 22:04:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= 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; Mon, 15 Jan 2018 22:04:25 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A7F9478540 for ; Mon, 15 Jan 2018 22:04:23 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-22.ams2.redhat.com [10.36.117.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 29F3A608F7; Mon, 15 Jan 2018 22:04:22 +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 w0FM4Jh4013730; Mon, 15 Jan 2018 23:04:20 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w0FM4Ioe013729; Mon, 15 Jan 2018 23:04:18 +0100 Date: Mon, 15 Jan 2018 23:04:18 +0100 From: Jakub Jelinek To: Vladimir Makarov , Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Bump minimum value for max-sched-ready-insns param to 1 (PR rtl-optimization/86620) Message-ID: <20180115220418.GG2063@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) X-IsSubscribed: yes Hi! This param allows minimum of 0, which doesn't make much sense. On the i386/pr83620.c test (when used with the =0 value) we ICE because ix86_adjust_priority which has code to prevent moving of likely spilled hard regs doesn't have a chance to do anything, since we don't consider any other insns as ready. This patch bumps the minimum to 1, so that there is at least something considered. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-01-15 Jakub Jelinek PR rtl-optimization/86620 * params.def (max-sched-ready-insns): Bump minimum value to 1. * gcc.dg/pr64935-2.c: Use --param=max-sched-ready-insns=1 instead of --param=max-sched-ready-insns=0. * gcc.target/i386/pr83620.c: New test. * gcc.dg/pr83620.c: New test. Jakub --- gcc/params.def.jj 2018-01-14 17:16:57.471836055 +0100 +++ gcc/params.def 2018-01-15 18:53:24.122124325 +0100 @@ -744,7 +744,7 @@ DEFPARAM (PARAM_MAX_FIELDS_FOR_FIELD_SEN DEFPARAM(PARAM_MAX_SCHED_READY_INSNS, "max-sched-ready-insns", "The maximum number of instructions ready to be issued to be considered by the scheduler during the first scheduling pass.", - 100, 0, 0) + 100, 1, 0) /* This is the maximum number of active local stores RTL DSE will consider. */ DEFPARAM (PARAM_MAX_DSE_ACTIVE_LOCAL_STORES, --- gcc/testsuite/gcc.dg/pr64935-2.c.jj 2017-06-19 08:27:46.126467108 +0200 +++ gcc/testsuite/gcc.dg/pr64935-2.c 2018-01-15 18:52:23.987124863 +0100 @@ -1,6 +1,6 @@ /* PR rtl-optimization/64935 */ /* { dg-do compile } */ -/* { dg-options "-O -fschedule-insns --param=max-sched-ready-insns=0 -fcompare-debug" } */ +/* { dg-options "-O -fschedule-insns --param=max-sched-ready-insns=1 -fcompare-debug" } */ /* { dg-require-effective-target scheduling } */ /* { dg-xfail-if "" { powerpc-ibm-aix* } } */ --- gcc/testsuite/gcc.target/i386/pr83620.c.jj 2018-01-15 18:53:43.267124153 +0100 +++ gcc/testsuite/gcc.target/i386/pr83620.c 2018-01-15 19:17:31.053208498 +0100 @@ -0,0 +1,15 @@ +/* PR rtl-optimization/86620 */ +/* { dg-do compile { target int128 } } */ +/* { dg-options "-O2 -flive-range-shrinkage --param=max-sched-ready-insns=1 -Wno-psabi -mno-avx" } */ + +typedef unsigned __int128 V __attribute__ ((vector_size (64))); + +V u, v; + +V +foo (char c, short d, int e, long f, __int128 g) +{ + f >>= c & 63; + v = (V){f} == u; + return e + g + v; +} --- gcc/testsuite/gcc.dg/pr83620.c.jj 2018-01-15 19:16:31.953190203 +0100 +++ gcc/testsuite/gcc.dg/pr83620.c 2018-01-15 19:16:16.499185414 +0100 @@ -0,0 +1,9 @@ +/* PR rtl-optimization/86620 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -flive-range-shrinkage --param=max-sched-ready-insns=0" } */ +/* { dg-error "minimum value of parameter 'max-sched-ready-insns' is 1" "" { target *-*-* } 0 } */ + +void +foo (void) +{ +}