From patchwork Thu Sep 1 05:30:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: HAO CHEN GUI X-Patchwork-Id: 882 Return-Path: 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 (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 ; 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 ; 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 Subject: [PATCH v2, rs6000] Put dg-options before effective target checks 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: HAO CHEN GUI via Gcc-patches From: HAO CHEN GUI Reply-To: HAO CHEN GUI Cc: Peter Bergner , David , Segher Boessenkool Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1742744120926523408?= X-GMAIL-MSGID: =?utf-8?q?1742744120926523408?= 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 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) {