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: 1672650 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=gMtXSx3F; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MJ8m32j9sz1yhP for ; Thu, 1 Sep 2022 15:31:14 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4A3E1382DB01 for ; Thu, 1 Sep 2022 05:31:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A3E1382DB01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662010272; 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=gMtXSx3F2L6XR4n5Ih4ujRR/OW/Kyy8ijnRPaVIq/vqD739IO+iiaC94QDTm0jJ9M fapmjUnAkmlkKVI+/8sj9fardfgl5akTDrc6F8qBG72uRm/pcunEqiKODHVy9k9mFM p3qRfGjnFLEJdpcTS7geANYzBe91R5ifKNGvUCY4= 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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) {