From patchwork Thu Oct 3 15:11:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Carl Love X-Patchwork-Id: 1992387 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=rwEtjg4h; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XKFWV43wSz1xtk for ; Fri, 4 Oct 2024 01:11:34 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8CF13384A821 for ; Thu, 3 Oct 2024 15:11:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id B92BA3858CDB for ; Thu, 3 Oct 2024 15:11:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B92BA3858CDB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B92BA3858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727968270; cv=none; b=cRMHJnOXILl+3doMXKNuxvlpEQJ5L0F+/0o7FNLDwHfdK0wX0y7pKpLa2OBVPh1G/tpnOlrt3kNyEIvdQ67gmrvYYMvssJvC5bnlvzSopiQ3tNqBpGHXcTUPSyLyR61FjPMGRJtICErA2sHnadD2i7RIAMzR2MNHsR24/BuRoY4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727968270; c=relaxed/simple; bh=AM08BU7Qmv1Hs6GJ65GV2Up2E4ZOktLz64N9niKXi3c=; h=DKIM-Signature:Message-ID:Date:MIME-Version:From:Subject:To; b=LcEOq3+YHCazW+aqOgsypbC7GC2+WsNjAAER70xcNVtR0iRR1+xMy30TEizRb9mlNMy6dWDWr2G6yYIs36S7HzHcA+SkRDg9je/MTdlj1OMIaiPvPrWML0djB+P53/xj76bO1GQUIMwHIFSkjSIUNmUJReXfJvXMrk8Wo8m7SBg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 493EjPO6022814; Thu, 3 Oct 2024 15:11:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h= message-id:date:mime-version:from:subject:to:content-type :content-transfer-encoding; s=pp1; bh=anHeafBBb9KtAvfiod0CbXcgwo YlEpbzlZRXHIrak/M=; b=rwEtjg4hiujVqX9YUiNoiSMVGv61mNfpeTQn3CE5UM TOO8xCRLERCt6PX9ccCN7WI1Y8x/51W/L9GX0kP+hDOd6ZFj/jI4ICNm1D73MfRB owEbvPaFbnXlYcTMvs6bMHAKPG7mJtv2r9P1FElW8iLvxQiZyxVCwWC+7vYGPKt3 3aSWLoUWcZnCrzq7NEI/0lxZ4qlnIjQRUlZNscgAnbxqNXzMTmgPoaYpOjBXs9Xg lBPMP4m4bbFzqNcGzYIWia8olRQzQ5WIKwdVGijS6LNXttro9rDvtlq2g/RW0JTX CYFyUTr2hhq5dC9yuOSu4sKO3Ntrc8wMCIpKoHHOmT6Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 421wae03mq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Oct 2024 15:11:06 +0000 (GMT) Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 493FB5RY019620; Thu, 3 Oct 2024 15:11:05 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 421wae03mm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Oct 2024 15:11:05 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 493Dtcu2002367; Thu, 3 Oct 2024 15:11:04 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([172.16.1.68]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 41xxu1g0yt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Oct 2024 15:11:04 +0000 Received: from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com [10.39.53.229]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 493FB36J48496958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Oct 2024 15:11:03 GMT Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6958D58058; Thu, 3 Oct 2024 15:11:03 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9EC535805C; Thu, 3 Oct 2024 15:11:02 +0000 (GMT) Received: from [9.67.2.251] (unknown [9.67.2.251]) by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP; Thu, 3 Oct 2024 15:11:02 +0000 (GMT) Message-ID: <9c03b8dd-3853-4e34-b876-d1aaac57fc85@linux.ibm.com> Date: Thu, 3 Oct 2024 08:11:01 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Carl Love Subject: [PATCH] rs6000, fix test builtins-1-p10-runnable.c To: GCC Patches , Peter Bergner , segher , cel , David Edelsohn X-TM-AS-GCONF: 00 X-Proofpoint-GUID: e269VvFP93mlwF4gTHz2XDdltqs91lft X-Proofpoint-ORIG-GUID: XgeddlnNJ46Kb4t2s3h1q0GBmTiDFGRQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-03_06,2024-10-03_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 suspectscore=0 phishscore=0 priorityscore=1501 mlxscore=0 impostorscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2410030107 X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org GCC maintainers: The builtins-1-10-runnable.c has the debugging inadvertently enabled.  The test uses #ifdef to enable/disable the debugging. Unfortunately, the #define DEBUG was set to 0 to disable debugging and enable the call to abort in case of error.  The #define should have been removed to disable debugging. Additionally, a change in the expected output which was made for testing purposes was not removed.  Hence, the test is printing that there was an error not calling abort.  The result is the test does not get reported as failing. This patch removes the #define DEBUG to enable the call to abort and restores the expected output to the correct value.  The patch was tested on a Power 10 without the #define DEBUG to verify that the test does fail with the incorrect expected value.  The correct expected value was then restored.  The test reports 19 expected passes and no errors. Please let me know if this patch is acceptable for mainline. Thanks.                                                                Carl --------------------------------------------------------------------------------------- rs6000, fix test builtins-1-p10-runnable.c The test has two issues: 1) The test should generate execute abort() if an error is found. However, the test contains a #define 0 which actually enables the error prints not exectuting void() because the debug code is protected by an #ifdef not #if.  The #define DEBUG needs to be removed to so the test will abort on an error. 2) The vec_i_expected output was tweeked to test that it would fail. The test value was not removed. By removing the #define DEBUG, the test fails and reports 1 failure. Removing the intentionally wrong expected value results in the test passing with no errors as expected. gcc/testsuite/ChangeLog:     * gcc.target/powerpc/builtins-1-p10-runnable.c: Remove #define     DEBUG.    Replace vec_i_expected value with correct value. ---  gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c | 5 +----  1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c b/gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c index 222c8b3a409..3e8a1c736e3 100644 --- a/gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c +++ b/gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c @@ -25,8 +25,6 @@  #include  #include -#define DEBUG 0 -  #ifdef DEBUG  #include  #endif @@ -281,8 +279,7 @@ int main()      /* Signed word multiply high */      i_arg1 = (vector int){ 2147483648, 2147483648, 2147483648, 2147483648 };      i_arg2 = (vector int){ 2, 3, 4, 5}; -    //    vec_i_expected = (vector int){-1, -2, -2, -3}; -    vec_i_expected = (vector int){1, -2, -2, -3}; +    vec_i_expected = (vector int){-1, -2, -2, -3};      vec_i_result = vec_mulh (i_arg1, i_arg2);