Message ID | 20055172-6ec9-6055-c02a-9f91b26e0296@linux.ibm.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp90966wro; Wed, 31 Aug 2022 22:31:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR7JCR9ESG/u47WnNtAybym9NJAcj2No4sPZISJDB3HyDMDyT3iFKqTJDnJsV2hSBB19/PZN X-Received: by 2002:a17:907:162a:b0:742:7a6:a812 with SMTP id hb42-20020a170907162a00b0074207a6a812mr8612097ejc.403.1662010308526; Wed, 31 Aug 2022 22:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662010308; cv=none; d=google.com; s=arc-20160816; b=0j1yqiw/9ZsX1bFCFpf4ZYeOs+Qrz150KJ7vxZ2/hKvsObWX1leFSH7v1JhvT4bHBd qO5eC1YLTfWhX2yVZc/gPjIE34W0JolMuGaTG89smacKswhvZdBADnDCBiIO7oQJJo3k OfkDzomzYZ6v8tgGzLV5r0Guy7vw+26u3ksi4wKTgPW4Z9tpUTUuBG7bEVNXpKBoXlei nOl1fz9wVocaCBVZDpRiMK3lR1VqqM9Rv9a9C774vxhxc1bGXV7twS3kBsQ/3HYY7Ayu tBnKvkH6yK8+r+8NmSmJWrqS/RCTBnd4eaX/V+XDdrLZuYKddOuLxxrbpLN7kJBZSBK4 N7UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:subject:to:content-language:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=gXvKQ2FG67/sG2ZfiHug6l1330W2eMLsZdmqHj4NylE=; b=G61WNpIrykWZUQ+r7Qye+9uMPsfgTXodMP+FGvNbFjEugd9bX2PIkxD6MDENocq67d uIHRY5OmfSDHPrWHxMmUn81NUaOZpheYA1tvDeyCXVVJ9Lb7eiKks4nKBVfaJvOjXCVa 485jiZp9eBJnUWg8QuQ/aYBlONRB3MXxUEgaRuXEhZjpLiMNv1MrNRhXdwX1BZ8/Pe9g kEHTX6o6hyuQXRRMEgkwnHyBFPSLPAoq7MhpXCj0uLMyYUL1TPPGqSMDrYkUOHqrkUgh TgubpDm0clQBysZn9j4JvVUUMsUXnVviVv8q88lRzv6EUUQA5+wbOgpxH9dBa8sC/QB2 k5+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=XgIjwJ3s; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id j19-20020a05640211d300b00447d567a77dsi1113587edw.207.2022.08.31.22.31.48 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 22:31:48 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=XgIjwJ3s; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B67313821362 for <ouuuleilei@gmail.com>; Thu, 1 Sep 2022 05:31:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B67313821362 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662010295; bh=gXvKQ2FG67/sG2ZfiHug6l1330W2eMLsZdmqHj4NylE=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=XgIjwJ3sExIrZQLzLSuLJkWHKfU7GvY5a6wKGCjDOo2Rq5S/1Z3cBR97wjqV+rXtD yGI6oGasl8ZWhwxEd9FW/gBaR0usGJSJDx0WfvJXPIxev9U/Na+1ZvUhS5F3EoxhpB fB1IeJ7USSPGbdDxBjPP+UQbOcpJba0VmlneCazk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 179D23854150 for <gcc-patches@gcc.gnu.org>; Thu, 1 Sep 2022 05:30:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 179D23854150 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2815Hmt9019574; Thu, 1 Sep 2022 05:30:50 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3japfe0cau-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Sep 2022 05:30:49 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2815JR3m028045; Thu, 1 Sep 2022 05:30:38 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3japfe0c3e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Sep 2022 05:30:37 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2815KNPa016568; Thu, 1 Sep 2022 05:30:25 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06fra.de.ibm.com with ESMTP id 3j7ahhvha6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Sep 2022 05:30:24 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2815Ui8N39125398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Sep 2022 05:30:44 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CE944AE04D; Thu, 1 Sep 2022 05:30:21 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F0CFAE045; Thu, 1 Sep 2022 05:30:20 +0000 (GMT) Received: from [9.200.101.101] (unknown [9.200.101.101]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 1 Sep 2022 05:30:20 +0000 (GMT) Message-ID: <20055172-6ec9-6055-c02a-9f91b26e0296@linux.ibm.com> Date: Thu, 1 Sep 2022 13:30:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Content-Language: en-US To: gcc-patches <gcc-patches@gcc.gnu.org> Subject: [PATCH v2, rs6000] Put dg-options before effective target checks Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: wkpwZpZ4Me3rYq7LPl2t_juxO47bT0_4 X-Proofpoint-ORIG-GUID: qNhymQnQnOWX_1pbAx7ZEufE84ZPpY6S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-09-01_02,2022-08-31_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 mlxscore=0 priorityscore=1501 phishscore=0 adultscore=0 bulkscore=0 clxscore=1015 mlxlogscore=822 spamscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209010022 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: HAO CHEN GUI via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: HAO CHEN GUI <guihaoc@linux.ibm.com> Cc: Peter Bergner <bergner@linux.ibm.com>, David <dje.gcc@gmail.com>, Segher Boessenkool <segher@kernel.crashing.org> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1742744120926523408?= X-GMAIL-MSGID: =?utf-8?q?1742744120926523408?= |
Series |
[v2,rs6000] Put dg-options before effective target checks
|
|
Commit Message
HAO CHEN GUI
Sept. 1, 2022, 5:30 a.m. UTC
Hi, This patch changes the sequence of test directives for 3 test cases. Originally, these 3 cases got failed or unsupported on some platforms, as their effective target checks depend on compiling options. Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. Is this okay for trunk? Any recommendations? Thanks a lot. Thanks Gui Haochen ChangeLog 2022-08-31 Haochen Gui <guihaoc@linux.ibm.com> rs6000: Change the sequence of test directives for some test cases. Put dg-options before effective target checks as those has_arch_* adopt current_compiler_flags in their checks and rely on compiling options to get an accurate check. dg-options setting before dg-require-effective-target are added into current_compiler_flags, but not added if they're after. So adjusting the location of dg-options makes the check more robust. gcc/testsuite/ * gcc.target/powerpc/pr92398.p9+.c: Put dg-options before effective target check. Replace lp64 check with has_arch_ppc64 and int128. * gcc.target/powerpc/pr92398.p9-.c: Likewise. * gcc.target/powerpc/pr93453-1.c: Put dg-options before effective target check. patch.diff
Comments
Hi Haochen, on 2022/9/1 13:30, HAO CHEN GUI wrote: > Hi, > This patch changes the sequence of test directives for 3 test cases. > Originally, these 3 cases got failed or unsupported on some platforms, as > their effective target checks depend on compiling options. > Thanks for the updated patch! I just found that it seems all the three test cases suffer the empty TU error issue from those has_arch* effective target checks? If yes, it looks we don't need to bother this once patch [1] gets landed? Sorry, I didn't notice and ask when reviewing the previous version. [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598748.html BR, Kewen > Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. > Is this okay for trunk? Any recommendations? Thanks a lot. > > Thanks > Gui Haochen > > ChangeLog > 2022-08-31 Haochen Gui <guihaoc@linux.ibm.com> > > rs6000: Change the sequence of test directives for some test cases. Put > dg-options before effective target checks as those has_arch_* adopt > current_compiler_flags in their checks and rely on compiling options to get an > accurate check. dg-options setting before dg-require-effective-target are > added into current_compiler_flags, but not added if they're after. So > adjusting the location of dg-options makes the check more robust. > > gcc/testsuite/ > * gcc.target/powerpc/pr92398.p9+.c: Put dg-options before effective > target check. Replace lp64 check with has_arch_ppc64 and int128. > * gcc.target/powerpc/pr92398.p9-.c: Likewise. > * gcc.target/powerpc/pr93453-1.c: Put dg-options before effective > target check. > > > patch.diff > diff --git a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c > index 72dd1d9a274..b4f5c7f4b82 100644 > --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c > @@ -1,6 +1,10 @@ > -/* { dg-do compile { target { lp64 && has_arch_pwr9 } } } */ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -mdejagnu-cpu=power9 -mvsx" } */ > +/* { dg-require-effective-target has_arch_ppc64 } */ > +/* { dg-require-effective-target int128 } */ > /* { dg-require-effective-target powerpc_vsx_ok } */ > -/* { dg-options "-O2 -mvsx" } */ > +/* The test case can be compiled on all platforms with compiling option > + -mdejagnu-cpu=power9. */ > > /* { dg-final { scan-assembler-times {\mmtvsrdd\M} 1 } } */ > /* { dg-final { scan-assembler-times {\mxxlnor\M} 1 } } */ > diff --git a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c > index bd7fa98af51..4e6a8c8cb8e 100644 > --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c > @@ -1,6 +1,8 @@ > -/* { dg-do compile { target { lp64 && {! has_arch_pwr9} } } } */ > -/* { dg-require-effective-target powerpc_vsx_ok } */ > /* { dg-options "-O2 -mvsx" } */ > +/* { dg-do compile { target { ! has_arch_pwr9 } } } */ > +/* { dg-require-effective-target int128 } */ > +/* { dg-require-effective-target has_arch_ppc64 } */ > +/* { dg-require-effective-target powerpc_vsx_ok } */ > > /* { dg-final { scan-assembler-times {\mnot\M} 2 { xfail be } } } */ > /* { dg-final { scan-assembler-times {\mstd\M} 2 { xfail { { {! has_arch_pwr9} && has_arch_pwr8 } && be } } } } */ > diff --git a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c > index b396458ba12..6f4d899c114 100644 > --- a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c > @@ -1,5 +1,6 @@ > -/* { dg-do compile { target has_arch_ppc64 } } */ > +/* { dg-do compile } */ > /* { dg-options "-mdejagnu-cpu=power6 -O2" } */ > +/* { dg-require-effective-target has_arch_ppc64 } */ > > unsigned long load_byte_reverse (unsigned long *in) > {
On Thu, Sep 01, 2022 at 01:30:18PM +0800, HAO CHEN GUI wrote: > --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c > @@ -1,6 +1,10 @@ > -/* { dg-do compile { target { lp64 && has_arch_pwr9 } } } */ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -mdejagnu-cpu=power9 -mvsx" } */ -mcpu=power9 already implies -mvsx. If you would keep -mvsx, that belongs *after* testing powerpc_vsx_ok. > +/* { dg-require-effective-target has_arch_ppc64 } */ > +/* { dg-require-effective-target int128 } */ > /* { dg-require-effective-target powerpc_vsx_ok } */ > -/* { dg-options "-O2 -mvsx" } */ > +/* The test case can be compiled on all platforms with compiling option > + -mdejagnu-cpu=power9. */ Please don't put in comments like this: that is what the code already *does*, after all :-) > --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c > @@ -1,6 +1,8 @@ > -/* { dg-do compile { target { lp64 && {! has_arch_pwr9} } } } */ > -/* { dg-require-effective-target powerpc_vsx_ok } */ > /* { dg-options "-O2 -mvsx" } */ You cannot add -mvsx without first testing powerpc_vsx_ok (unless it is guaranteed some other way of course; here, it isn't). > +/* { dg-do compile { target { ! has_arch_pwr9 } } } */ Please keep dg-do first thing in the file. > --- a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c > @@ -1,5 +1,6 @@ > -/* { dg-do compile { target has_arch_ppc64 } } */ > +/* { dg-do compile } */ > /* { dg-options "-mdejagnu-cpu=power6 -O2" } */ > +/* { dg-require-effective-target has_arch_ppc64 } */ This is fine, but it doesn't change anything, unless we have a bug. Segher
Hi Kewen, On 1/9/2022 下午 5:34, Kewen.Lin wrote: > Thanks for the updated patch! > > I just found that it seems all the three test cases suffer the empty > TU error issue from those has_arch* effective target checks? > > If yes, it looks we don't need to bother this once patch [1] gets > landed? > > Sorry, I didn't notice and ask when reviewing the previous version. > > [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598748.html Yes, those 3 test cases all suffer from "empty translation unit" problem. My patch just has an side effect which avoid "empty translation unit" problem. But the real problem is still there. pr92398.p9+.c has another problem. It's a compiling case and it should be compiled on any platform when "-mdejagnu-cpu=power9" is set in dg-options or RUNTESTFLAGS. Putting dg-options before "has_arch_pwr9" check achieves this target. Thanks Gui Haochen
Hi Segher, Thanks for your review comments. I will refine it according to your comments. On 2/9/2022 上午 12:07, Segher Boessenkool wrote: >> +/* { dg-do compile { target { ! has_arch_pwr9 } } } */ > Please keep dg-do first thing in the file. Could you inform me if it's a must to put dg-do in the first line? Here I hit a problem. "! has_arch_pwr9" can not be put into dg-require-effective-target as it has a NOT. So I put dg-options in the first line and make it ahead of dg-do. > >> --- a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c >> +++ b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c >> @@ -1,5 +1,6 @@ >> -/* { dg-do compile { target has_arch_ppc64 } } */ >> +/* { dg-do compile } */ >> /* { dg-options "-mdejagnu-cpu=power6 -O2" } */ >> +/* { dg-require-effective-target has_arch_ppc64 } */ > This is fine, but it doesn't change anything, unless we have a bug. This case suffer from "empty translation unit" problem and to be unsupported on all platform. Put dg-options before the check avoid the problem. Thanks Gui Haochen
on 2022/9/2 11:23, HAO CHEN GUI wrote: > Hi Kewen, > > On 1/9/2022 下午 5:34, Kewen.Lin wrote: >> Thanks for the updated patch! >> >> I just found that it seems all the three test cases suffer the empty >> TU error issue from those has_arch* effective target checks? >> >> If yes, it looks we don't need to bother this once patch [1] gets >> landed? >> >> Sorry, I didn't notice and ask when reviewing the previous version. >> >> [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598748.html > > Yes, those 3 test cases all suffer from "empty translation unit" problem. > My patch just has an side effect which avoid "empty translation unit" > problem. But the real problem is still there. OK, thanks for the information! If so, I would prefer to leave them alone for now, the issues should be fixed once [1] gets landed. > > pr92398.p9+.c has another problem. It's a compiling case and it should be > compiled on any platform when "-mdejagnu-cpu=power9" is set in dg-options > or RUNTESTFLAGS. Putting dg-options before "has_arch_pwr9" check achieves > this target. OK, then go ahead to enhance it separately. :) BR, Kewen
Hi! On Fri, Sep 02, 2022 at 11:43:28AM +0800, HAO CHEN GUI wrote: > On 2/9/2022 上午 12:07, Segher Boessenkool wrote: > >> +/* { dg-do compile { target { ! has_arch_pwr9 } } } */ > > Please keep dg-do first thing in the file. > Could you inform me if it's a must to put dg-do in the first line? It is customary. If you do differently it will be a lot harder for people to truly understand your tests. > Here I hit a problem. "! has_arch_pwr9" can not be put into > dg-require-effective-target as it has a NOT. dg-require-effective-target has a selector, maybe you can do something with that? dg-require-effective-target { whatever { has_arch_pwr9 } } or something like that? > >> --- a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c > >> +++ b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c > >> @@ -1,5 +1,6 @@ > >> -/* { dg-do compile { target has_arch_ppc64 } } */ > >> +/* { dg-do compile } */ > >> /* { dg-options "-mdejagnu-cpu=power6 -O2" } */ > >> +/* { dg-require-effective-target has_arch_ppc64 } */ > > This is fine, but it doesn't change anything, unless we have a bug. > > This case suffer from "empty translation unit" problem and to be > unsupported on all platform. Put dg-options before the check avoid > the problem. Then please fix that problem first! It *will* come back to bite us, multiple times per week, until it is fixed. Segher
diff --git a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c index 72dd1d9a274..b4f5c7f4b82 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c @@ -1,6 +1,10 @@ -/* { dg-do compile { target { lp64 && has_arch_pwr9 } } } */ +/* { dg-do compile } */ +/* { dg-options "-O2 -mdejagnu-cpu=power9 -mvsx" } */ +/* { dg-require-effective-target has_arch_ppc64 } */ +/* { dg-require-effective-target int128 } */ /* { dg-require-effective-target powerpc_vsx_ok } */ -/* { dg-options "-O2 -mvsx" } */ +/* The test case can be compiled on all platforms with compiling option + -mdejagnu-cpu=power9. */ /* { dg-final { scan-assembler-times {\mmtvsrdd\M} 1 } } */ /* { dg-final { scan-assembler-times {\mxxlnor\M} 1 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c index bd7fa98af51..4e6a8c8cb8e 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c @@ -1,6 +1,8 @@ -/* { dg-do compile { target { lp64 && {! has_arch_pwr9} } } } */ -/* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-options "-O2 -mvsx" } */ +/* { dg-do compile { target { ! has_arch_pwr9 } } } */ +/* { dg-require-effective-target int128 } */ +/* { dg-require-effective-target has_arch_ppc64 } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-final { scan-assembler-times {\mnot\M} 2 { xfail be } } } */ /* { dg-final { scan-assembler-times {\mstd\M} 2 { xfail { { {! has_arch_pwr9} && has_arch_pwr8 } && be } } } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c index b396458ba12..6f4d899c114 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c +++ b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c @@ -1,5 +1,6 @@ -/* { dg-do compile { target has_arch_ppc64 } } */ +/* { dg-do compile } */ /* { dg-options "-mdejagnu-cpu=power6 -O2" } */ +/* { dg-require-effective-target has_arch_ppc64 } */ unsigned long load_byte_reverse (unsigned long *in) {