From patchwork Fri Aug 9 00:01:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joern Wolfgang Rennecke X-Patchwork-Id: 1970745 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=riscy-ip.com header.i=@riscy-ip.com header.a=rsa-sha256 header.s=default header.b=pNQzgQFn; 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 4Wg3y55SmMz1ybT for ; Fri, 9 Aug 2024 10:02:33 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 139DE3858C41 for ; Fri, 9 Aug 2024 00:02:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id F1C9E3858C41 for ; Fri, 9 Aug 2024 00:01:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F1C9E3858C41 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=riscy-ip.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=riscy-ip.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F1C9E3858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723161701; cv=none; b=OCBoDVXtdJF4tGHJINCYjstyTANcrfUCONXKwmhBzp+vpeuOj9FWWXDPmv+dcJYohfx6xAjwiNu3jKUFvSUpo7OVnxeQYtYib3xPDVNefOJ+TVgrzAhv/UojqUHBF23KofcKS4sPDFGJUEdxyNFTzy5LTRbTGahPogH4adqEA38= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723161701; c=relaxed/simple; bh=1c/2hhgoP/Tsc6oEctq99ZoxszaS/lJLE3gkQacPfxA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject; b=QSif8n1+GJlFxeCZmx6kcjTtQDyZOtITScocYWYtbDOHPfl0iyO1i4NVuJWDAkEEkX7zI2TNRbU8TyFTG9j1fs9zo/ifhkUm0+7uZTAHiEbY2aqaVM73bXLQi3MKvINXNjqjt5kU2Uu7BqetvTOVH9wxO3t3EzHPZ/3eXmfQ4R0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6010a.ext.cloudfilter.net ([10.0.30.248]) by cmsmtp with ESMTPS id cCQOs3VTBg2lzcD4bsaR0J; Fri, 09 Aug 2024 00:01:37 +0000 Received: from just2023.justhost.com ([173.254.28.231]) by cmsmtp with ESMTPS id cD4ZsipI1HfXJcD4Zsd6Np; Fri, 09 Aug 2024 00:01:35 +0000 X-Authority-Analysis: v=2.4 cv=SouW6uO0 c=1 sm=1 tr=0 ts=66b55c5f a=YASUF7UNcoqeS7t9RS8wjw==:117 a=YASUF7UNcoqeS7t9RS8wjw==:17 a=yoJbH4e0A30A:10 a=r77TgQKjGQsHNAKrUKIA:9 a=blvMZ6_WF9rOX1WS0QQA:9 a=QEXdDO2ut3YA:10 a=5bgceILEAAAA:8 a=Z_djUk0CdYi_CHbquJEA:9 a=m-Z_27IZkzAA:10 a=bA5y-8BQ6xV_CXoMkqSI:22 a=7z3vdgOOfqBDWbZOyawU:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=riscy-ip.com; s=default; h=Subject:From:To:MIME-Version:Date:Message-ID: Content-Type:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8x1TJQQ1Bs4B1NDuC1ZJNiLErFitXU909QE8mxVXjO0=; b=pNQzgQFnLBrEDTnPn+ohuDC+Q3 FRH7Z8A1fcgRMm+QxsxT7SAntGmMSLeGqKzFtxP+JMHMZn3tSOihkdqEQ25JAhlIgshvIEP3pY5/P vIYRMAWo6nisGcvnKqrUhmpj2jXumIXexMHgOFS5CBsNvFloRkjwkTkXiCO/B7ySyenWl55tuOqzB tK25pdMt7SlnrCMzvdHAzoYWVZEkqv20m/nH8UDtyyVoLjfXq48ZlLRlkRjgSh7DvRRtYfVAhuaMo pjh2wff2HPcTRCgV5QG2koNf0ImJKm9d08Ka45hRFsBPnDODEOgn2E5lDQQdd35xfJJAavImvADLt ocB9tNkg==; Received: from cust213-dsl91-135-11.idnet.net ([91.135.11.213]:50626 helo=[192.168.1.137]) by just2023.justhost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1scD4Y-0045ZA-2i for gcc-patches@gcc.gnu.org; Thu, 08 Aug 2024 18:01:34 -0600 Message-ID: <19da5a41-fbbb-45dd-9df7-3768fb88b2cc@riscy-ip.com> Date: Fri, 9 Aug 2024 01:01:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-MW To: GCC Patches From: Joern Wolfgang Rennecke Subject: [PATCH]: Fix PR testsuite/116271, gcc.dg/vect/tsvc/vect-tsvc-s176.c fails X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - just2023.justhost.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - riscy-ip.com X-BWhitelist: no X-Source-IP: 91.135.11.213 X-Source-L: No X-Exim-ID: 1scD4Y-0045ZA-2i X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cust213-dsl91-135-11.idnet.net ([192.168.1.137]) [91.135.11.213]:50626 X-Source-Auth: joern.rennecke@riscy-ip.com X-Email-Count: 1 X-Org: HG=bhshared_jh;ORG=bluehost; X-Source-Cap: cmlzY3lpcGM7cmlzY3lpcGM7anVzdDIwMjMuanVzdGhvc3QuY29t X-Local-Domain: yes X-CMAE-Envelope: MS4xfKZGmc4AXIme3TVY2wCp9GEiHVw7D61qcqYZeY/ozBE1iDdm1jESr0J5/vcWI+Pvr6/tyJI/iMIsV4GP6uDp2Pp9KBQzM3YPbora319K3K5fy6NXPDGt 8I7bC4h1mzderfMr53eUwZGcJsbHgmZ0KftCiP4JXOpc5NrjLxQHp0zdcKmz2wBCaV6c5m5phe9ZkOkoviZ9GhYOC5FcNsNYdGI8k27NsIb5YsqZ+xXvcbdi X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, JMQ_SPF_NEUTRAL, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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 In the previous patch to reduce iteration counts, I have overlooked that, in the inner loop of s176, the array index i+m-j-1 turns negativeat for higher iterations of the middle loop for small m. m and the iteration end of the middle loop should stay the same. Fix PR testsuite/116271, gcc.dg/vect/tsvc/vect-tsvc-s176.c fails 2024-08-07 Joern Rennecke gcc/testsuite: PR testsuite/116271 * gcc.dg/vect/tsvc/vect-tsvc-s176.c [TRUNCATE_TEST]: Make sure that m stays the same as the loop bound of the middle loop. * gcc.dg/vect/tsvc/tsvc.h (get_expected_result): [TRUNCATE_TEST]: Adjust expected value. Index: gcc.dg/vect/tsvc/tsvc.h =================================================================== --- gcc.dg/vect/tsvc/tsvc.h (revision 6682) +++ gcc.dg/vect/tsvc/tsvc.h (working copy) @@ -1727,7 +1727,7 @@ real_t get_expected_result(const char * name) #ifndef TRUNCATE_TEST return 32021.121094f; #else /* TRUNCATE_TEST */ - return 32024.082031f; + return 32023.751953f; #endif /* TRUNCATE_TEST */ #endif /* iterations */ } else { Index: gcc.dg/vect/tsvc/vect-tsvc-s176.c =================================================================== --- gcc.dg/vect/tsvc/vect-tsvc-s176.c (revision 6682) +++ gcc.dg/vect/tsvc/vect-tsvc-s176.c (working copy) @@ -15,18 +15,20 @@ real_t s176(struct args_t * func_args) initialise_arrays(__func__); - int m = LEN_1D/2; #ifdef TRUNCATE_TEST - /* Do something equivalent to if (1) which the compiler is unlikely to - figure out. - FUNC_ARGS is in the caller's frame, so it shouldn't be between A and B. - */ - if ((void *)func_args <= (void *)a || (void *)func_args >= (void *)b) - m = 32; +/* Reduce the iteration counts without changing what is a variable and + what is a constant expression. + 32000/25 == 640, i.e. it still has a nice power of two factor, but is + not a power of two itself, and still somewhat large-ish, so hopefully + this won't perturb the vectorizer decisions much. */ +#define M_CONST LEN_1D/50 +#else +#define M_CONST LEN_1D/2 #endif + int m = M_CONST; for (int nl = 0; nl < 4*(10*iterations/LEN_1D); nl++) { - for (int j = 0; j < (LEN_1D/2); j++) { + for (int j = 0; j < (M_CONST); j++) { for (int i = 0; i < m; i++) { a[i] += b[i+m-j-1] * c[j]; }