Message ID | 20240508075457.1243150-1-stefansf@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> 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 2B2BB38A8177 for <patchwork@sourceware.org>; Wed, 8 May 2024 07:56:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 8EC193886C70 for <gcc-patches@gcc.gnu.org>; Wed, 8 May 2024 07:56:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8EC193886C70 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 8EC193886C70 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715154962; cv=none; b=T5pfcKD5fGiiDtkSsqC+TVEVfZqx2junnuwPGKyQGIj1Qjj0R9YBUEYi0P731lEx97PpgEHkneUpRSUnE/XDsN08CWEWmffw5qh1mYn9Zg4e3jg+Gzxp17/uuSeXSIni6b9chvh94ac/aZZM7ALV1cUmlgxT0r/zaEmeiObh4rc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715154962; c=relaxed/simple; bh=YHQMEzv1bQ8O5DsMUBkIwx1ZyEzvHtg7hqrUoPlrhFk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=CilVFOhLyogEhYN61jQasegtoghFkVoVKUp4cTivU/YTq0In+nonwJyW9b+6rdVsL7rrqo2pAsPqE5RwqnXlOqddUXcCLua3ewWUeNFsTjG4/fDkFmH1k4Qz5zBDO1V7erEzIaGbp1tj17l14g4F2jIJKrhsPiQ8so82lkPxNTs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4487YDP0018332 for <gcc-patches@gcc.gnu.org>; Wed, 8 May 2024 07:56:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=ro6+WlOLQS6krf2V4teQGTA+2euUY7+6AfiyBdASH/Q=; b=qJaja2+4Rd+GNNmVw1mVRyiHKjhmyRlF3MyWIhhQdTzL5B3MqJ0LuTqcp+Q7GuEb1vQl RvITZCllvqmEAXMbN2/pz1Lgu9dkFTJ6JudjgGgPUsq4On9Ulr9YL2gOc0va2xEA7Ibg QD7ezmnVcaCUj3gxGqIncA/DXODv2ZNg2dObYQNcPKKkam9mCd6W5AJhQxh8zUgispAy bQH7vY4po+UkOHiYxLTIwMa1+Y69gYNfk3xGXR5+OwpjEKmq836WoZWtB/TWnbC34s4t X4eSA/KBKhO6bGH1LaKWdnbuy/q2Igfxrs3tQPSEDaNaLkg2xbAjOjnpBvofk3cJfApd nA== 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 3y0546r1y5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Wed, 08 May 2024 07:55:59 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 4484XDAZ017557 for <gcc-patches@gcc.gnu.org>; Wed, 8 May 2024 07:55:59 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xyshsuf2p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Wed, 08 May 2024 07:55:59 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 4487trRa48497058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 May 2024 07:55:55 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A70752004B; Wed, 8 May 2024 07:55:53 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B03820043; Wed, 8 May 2024 07:55:53 +0000 (GMT) Received: from a8345010.lnxne.boe (unknown [9.152.108.100]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTPS; Wed, 8 May 2024 07:55:53 +0000 (GMT) From: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> To: gcc-patches@gcc.gnu.org Cc: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> Subject: [PATCH] tree-ssa-loop-prefetch.cc: Honour -fno-unroll-loops Date: Wed, 8 May 2024 09:54:57 +0200 Message-ID: <20240508075457.1243150-1-stefansf@linux.ibm.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 410p_unp5xZuNFg-cVSdjC06COFKP9dq X-Proofpoint-ORIG-GUID: 410p_unp5xZuNFg-cVSdjC06COFKP9dq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-08_04,2024-05-08_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 bulkscore=0 mlxlogscore=804 adultscore=0 spamscore=0 suspectscore=0 priorityscore=1501 phishscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405080057 X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org |
Series |
tree-ssa-loop-prefetch.cc: Honour -fno-unroll-loops
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gcc_build--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 | warning | Patch is already merged |
linaro-tcwg-bot/tcwg_gcc_check--master-arm | warning | Patch is already merged |
Commit Message
Stefan Schulze Frielinghaus
May 8, 2024, 7:54 a.m. UTC
On s390 the following tests fail FAIL: gcc.dg/vect/pr109011-1.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .CLZ \\\\(vect" 1 FAIL: gcc.dg/vect/pr109011-1.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 FAIL: gcc.dg/vect/pr109011-1.c scan-tree-dump-times optimized " = .CLZ \\\\(vect" 1 FAIL: gcc.dg/vect/pr109011-1.c scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 FAIL: gcc.dg/vect/pr109011-2.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .CTZ \\\\(vect" 2 FAIL: gcc.dg/vect/pr109011-2.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 FAIL: gcc.dg/vect/pr109011-2.c scan-tree-dump-times optimized " = .CTZ \\\\(vect" 2 FAIL: gcc.dg/vect/pr109011-2.c scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 FAIL: gcc.dg/vect/pr109011-4.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .CTZ \\\\(vect" 2 FAIL: gcc.dg/vect/pr109011-4.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 FAIL: gcc.dg/vect/pr109011-4.c scan-tree-dump-times optimized " = .CTZ \\\\(vect" 2 FAIL: gcc.dg/vect/pr109011-4.c scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 because aprefetch unrolls loops even if -fno-unroll-loops is used. Accordingly, the scan patterns match more than one time. Could also be fixed by using -fno-prefetch-loop-arrays for the tests. Though, I tend to prefer if aprefetch honours -fno-unroll-loops. Any preferences? Bootstrapped and regtested on x86_64 and s390. Ok for mainline? gcc/ChangeLog: * tree-ssa-loop-prefetch.cc (determine_unroll_factor): Honour -fno-unroll-loops. --- gcc/tree-ssa-loop-prefetch.cc | 4 ++++ 1 file changed, 4 insertions(+)
Comments
On Wed, May 8, 2024 at 9:56 AM Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> wrote: > > On s390 the following tests fail > > FAIL: gcc.dg/vect/pr109011-1.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .CLZ \\\\(vect" 1 > FAIL: gcc.dg/vect/pr109011-1.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 > FAIL: gcc.dg/vect/pr109011-1.c scan-tree-dump-times optimized " = .CLZ \\\\(vect" 1 > FAIL: gcc.dg/vect/pr109011-1.c scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 > FAIL: gcc.dg/vect/pr109011-2.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .CTZ \\\\(vect" 2 > FAIL: gcc.dg/vect/pr109011-2.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 > FAIL: gcc.dg/vect/pr109011-2.c scan-tree-dump-times optimized " = .CTZ \\\\(vect" 2 > FAIL: gcc.dg/vect/pr109011-2.c scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 > FAIL: gcc.dg/vect/pr109011-4.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .CTZ \\\\(vect" 2 > FAIL: gcc.dg/vect/pr109011-4.c -flto -ffat-lto-objects scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 > FAIL: gcc.dg/vect/pr109011-4.c scan-tree-dump-times optimized " = .CTZ \\\\(vect" 2 > FAIL: gcc.dg/vect/pr109011-4.c scan-tree-dump-times optimized " = .POPCOUNT \\\\(vect" 1 > > because aprefetch unrolls loops even if -fno-unroll-loops is used. > Accordingly, the scan patterns match more than one time. > > Could also be fixed by using -fno-prefetch-loop-arrays for the tests. > Though, I tend to prefer if aprefetch honours -fno-unroll-loops. Any > preferences? > > Bootstrapped and regtested on x86_64 and s390. Ok for mainline? OK. Richard. > gcc/ChangeLog: > > * tree-ssa-loop-prefetch.cc (determine_unroll_factor): Honour > -fno-unroll-loops. > --- > gcc/tree-ssa-loop-prefetch.cc | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/gcc/tree-ssa-loop-prefetch.cc b/gcc/tree-ssa-loop-prefetch.cc > index 70073cc4fe4..bb5d5dec779 100644 > --- a/gcc/tree-ssa-loop-prefetch.cc > +++ b/gcc/tree-ssa-loop-prefetch.cc > @@ -1401,6 +1401,10 @@ determine_unroll_factor (class loop *loop, struct mem_ref_group *refs, > struct mem_ref_group *agp; > struct mem_ref *ref; > > + /* Bail out early in case we must not unroll loops. */ > + if (!flag_unroll_loops) > + return 1; > + > /* First check whether the loop is not too large to unroll. We ignore > PARAM_MAX_UNROLL_TIMES, because for small loops, it prevented us > from unrolling them enough to make exactly one cache line covered by each > -- > 2.44.0 >
diff --git a/gcc/tree-ssa-loop-prefetch.cc b/gcc/tree-ssa-loop-prefetch.cc index 70073cc4fe4..bb5d5dec779 100644 --- a/gcc/tree-ssa-loop-prefetch.cc +++ b/gcc/tree-ssa-loop-prefetch.cc @@ -1401,6 +1401,10 @@ determine_unroll_factor (class loop *loop, struct mem_ref_group *refs, struct mem_ref_group *agp; struct mem_ref *ref; + /* Bail out early in case we must not unroll loops. */ + if (!flag_unroll_loops) + return 1; + /* First check whether the loop is not too large to unroll. We ignore PARAM_MAX_UNROLL_TIMES, because for small loops, it prevented us from unrolling them enough to make exactly one cache line covered by each