From patchwork Thu Nov 18 13:42:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 47884 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9FF153858018 for ; Thu, 18 Nov 2021 13:43:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9FF153858018 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1637243002; bh=ELbdm4Dxg8hVxKrHJhKZcWXAPPiD1GzX8/T74mSfyCc=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=nvC4i0JUHKzP8gWvT58YSUSqGU9qmC6GF2gHipNUCuVw7y7SsTyIq0l42M+V8wB/W KS1zWmWh41VfTE89AVbq0tsbFIZBhHhvATQuhTlZqCQlNNPYSno/eCWjn3qczsor0L JMezERF8Qs3o0imroAvV706aNQ5f/lBACisYHR2M= 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 AD65B3857811 for ; Thu, 18 Nov 2021 13:42:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AD65B3857811 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AIDHmWB025822; Thu, 18 Nov 2021 13:42:40 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3cdqke8mdp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Nov 2021 13:42:40 +0000 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1AIDJVgD029553; Thu, 18 Nov 2021 13:42:39 GMT Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com with ESMTP id 3cdqke8mda-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Nov 2021 13:42:39 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1AIDd1mP011761; Thu, 18 Nov 2021 13:42:38 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma01dal.us.ibm.com with ESMTP id 3ca50dcd1x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Nov 2021 13:42:38 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AIDgaeN39453014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Nov 2021 13:42:37 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DACF7B2074; Thu, 18 Nov 2021 13:42:36 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C16C3B2073; Thu, 18 Nov 2021 13:42:35 +0000 (GMT) Received: from [9.211.84.243] (unknown [9.211.84.243]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 18 Nov 2021 13:42:35 +0000 (GMT) Message-ID: Date: Thu, 18 Nov 2021 07:42:34 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 To: GCC Patches Subject: [PATCH] rs6000: Builtins test changes for byte-in-set-2.c X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: LLXiHE4dIWUye0sAi5TVvrVV67gHpAAs X-Proofpoint-GUID: VNY9kVsuPTjsSM7nnrETvwLPjSwXfgGG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-18_05,2021-11-17_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 impostorscore=0 suspectscore=0 clxscore=1015 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111180077 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Bill Schmidt via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: wschmidt@linux.ibm.com Cc: David Edelsohn , Segher Boessenkool Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi! This patch is broken out from the previous patch for builtins test suite changes. With the old builtins support, this test case produces: warning: implicit declaration of function '__builtin_byte_in_set'; did you mean '__builtin_byte_in_range'? With the new support, it produces: error: '__builtin_scalar_byte_in_set' requires the '-mcpu=power9' option and either the '-m64' or '-mpowerpc64' option note: builtin '__builtin_byte_in_set' requires builtin '__builtin_scalar_byte_in_set' The reason for this is that this builtin wasn't even initialized in the old support, being defined as a "BU_P9_64BIT_2". This reflects a difference in philosophy between the old and new methods. The old support often doesn't initialize builtins for which the conditions don't apply based on compile options, but this can backfire in general when such constructs as "#pragma target" are used. The new support initializes all builtins, and waits until expand time to determine whether or not they are enabled. Besides added flexibility, we also get better error messages as a result. Tested on powerpc64le-linux-gnu and powerpc-linux-gnu (-m32/-m64) with no regressions. Is this okay for trunk? Thanks! Bill 2021-11-17 Bill Schmidt gcc/testsuite/ * gcc.target/powerpc/byte-in-set-2.c: Adjust error message. --- gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c b/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c index 44cc7782760..4c676ba356d 100644 --- a/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c +++ b/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c @@ -10,5 +10,5 @@ int test_byte_in_set (unsigned char b, unsigned long long set_members) { - return __builtin_byte_in_set (b, set_members); /* { dg-warning "implicit declaration of function" } */ + return __builtin_byte_in_set (b, set_members); /* { dg-error "'__builtin_scalar_byte_in_set' requires the" } */ }