From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34002 invoked by alias); 30 Nov 2018 23:15:57 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 33822 invoked by uid 89); 30 Nov 2018 23:15:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no 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; Fri, 30 Nov 2018 23:15:44 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AD47A65179; Fri, 30 Nov 2018 23:15:42 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-27.rdu2.redhat.com [10.10.112.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CD177F65D; Fri, 30 Nov 2018 23:15:41 +0000 (UTC) Subject: Re: [PATCH] Introduce --param logical-op-non-short-circuit (PR testsuite/85368) To: Jakub Jelinek , Richard Biener Cc: gcc-patches@gcc.gnu.org References: <20181130205036.GG12380@tucnak> From: Jeff Law Openpgp: preference=signencrypt Message-ID: <878260c2-9bc9-164f-460d-d0ab62952b94@redhat.com> Date: Fri, 30 Nov 2018 23:15:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181130205036.GG12380@tucnak> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg02623.txt.bz2 On 11/30/18 1:50 PM, Jakub Jelinek wrote: > Hi! > > Until we stop depending on BRANCH_COST and LOGICAL_OP_NON_SHORT_CIRCUIT > macros at least for early GIMPLE, I'm afraid the current state for the > testsuite is terrible, on some targets it is enough to use > -mbranch-cost={1,2} to pick either of the setting, but other targets, > while they implement -mbranch-cost=, redefine LOGICAL_OP_NON_SHORT_CIRCUIT, > so it ignores BRANCH_COST altogether, or sometimes, other targets don't > implement -mbranch-cost= and have various complex definitions of BRANCH_COST > or LOGICAL_OP_NON_SHORT_CIRCUIT depending on other command line options. > > The following patch introduces a new param (not an option, to make it > clearer it is intended primarily for the testsuite and we can more easily > remove it again) that overrides the target's LOGICAL_OP_NON_SHORT_CIRCUIT > and adjusts the testsuite to use it. > > Bootstrapped/regtested on x86_64-linux and i686-linux, Christophe has kindly > tested it on ARM. Ok for trunk? > > 2018-11-30 Jakub Jelinek > > PR testsuite/85368 > * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param. > * tree-ssa-ifcombine.c (ifcombine_ifandif): If > --param logical-op-non-short-circuit is present, override > LOGICAL_OP_NON_SHORT_CIRCUIT value from the param. > * fold-const.c (fold_range_test, fold_truth_andor): Likewise. > > * lib/target-supports.exp (logical_op_short_circuit): Remove. > * gcc.dg/builtin-bswap-7.c: Remove logical_op_short_circuit > effective target, drop -mbranch-cost= options from the test and > instead pass --param logical-op-non-short-circuit=0 or > --param logical-op-non-short-circuit=1 depending on what the > tests meant to test. > * gcc.dg/pr21643.c: Likewise. > * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c: Likewise. > * gcc.dg/tree-ssa/phi-opt-11.c: Likewise. > * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c: Likewise. > * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Likewise. > * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c: Likewise. > * gcc.dg/tree-ssa/ssa-thread-14.c: Likewise. > * gcc.dg/tree-ssa/vrp47.c: Likewise. > * gcc.dg/tree-ssa/ssa-dom-thread-11.c: Likewise. > * gcc.dg/tree-ssa/ssa-dom-thread-16.c: Likewise. > * gcc.dg/tree-ssa/ssa-dom-thread-14.c: Likewise. > * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c: Likewise. > * gcc.dg/tree-ssa/vrp87.c: Likewise. > * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c: Likewise. > * gcc.dg/tree-ssa/phi-opt-2.c: Likewise. > * gcc.dg/tree-ssa/ssa-ifcombine-13.c: Likewise. > * gcc.dg/tree-ssa/ssa-thread-11.c: Likewise. > * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c: Likewise. > * gcc.dg/tree-ssa/forwprop-28.c: Likewise. > * gcc.dg/binop-xor1.c: Likewise. > * gcc.dg/pr46309.c: Likewise. > * gcc.dg/tree-ssa/ssa-dom-thread-18.c: New test. > * gcc.dg/tree-ssa/reassoc-32.c: Add > --param logical-op-non-short-circuit=1 to dg-options. > * gcc.dg/tree-ssa/reassoc-33.c: Likewise. > * gcc.dg/tree-ssa/reassoc-34.c: Likewise. > * gcc.dg/tree-ssa/reassoc-35.c: Likewise. > * gcc.dg/tree-ssa/reassoc-36.c: Likewise. OK. Jeff