From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 51CD338323F3 for ; Tue, 7 Nov 2023 10:59:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 51CD338323F3 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 51CD338323F3 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.252 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699354777; cv=none; b=wz38zYchSrCNAqkqJEXJlTsL1rYvQjBgrgO48f2YEGJxe08hnLzOYka86BWKHLZlFSZIKGI+jHTmPi835bVY1tATnjU7NBKDGmzIKfFUTnoOrhnLmLih97pnir4ZV6qGsP/cP0ruPzj6HtOQMh7OMacE3r0qwYFh0D7qFyac5NQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699354777; c=relaxed/simple; bh=uYH8kP39HLoHYYCtsnSREQtyCckcABODobGkuqATv84=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=wyBFB1KVitWZdWDEwcpoE11FaZbcFWO2QP9NWbI99x/WPeLbbIvmY9WSeWkNrRWaljhGuKCMKXBggk78GMwfIdOuqMP7+kwziQfMO7t5vqkZLexL/t9bT4DY1wYiDTcbwJRqNi8mRNXOhhJoXzyOuojF+9i6GDJ1i84HQWa1u1E= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: P6r0FbL2RK6YIzBh5pEgtg== X-CSE-MsgGUID: mcY530BtR+WUulmK7Kk+9w== X-IronPort-AV: E=Sophos;i="6.03,283,1694764800"; d="scan'208";a="22115669" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 07 Nov 2023 02:59:34 -0800 IronPort-SDR: C5u86+zpOG3Do2fMbgq+5aANOHqjbHJ1RwQj5X7lD/DYxN4jwwvMq9Km1VjRJEAM8Gy6LHbzI4 39kJQMmfBqAjF6qRlJPgfjLM+BqjewRG0G+uOmH3NWD+L0KI6mue0dVLp9DQ9DZ4EkDtxreBAV C70x/sPLbG3uUBleefeSVgj4lSapSm4aDhG9Fx9tFezi1N4smdz7XHMjwX9ACYEDIJoW7Z+zdp wHC6a3kaRCiv05TCdBwmdVFDsbXo86tPew1Dotz/maUdS454y7/8LVXDW9HFMKVayzedaRQmXD R5M= Message-ID: <6c2e542d-e41f-4cba-9224-8cb8218d7079@codesourcery.com> Date: Tue, 7 Nov 2023 10:59:28 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] test: Fix FAIL of pr97428.c for RVV Content-Language: en-GB To: "juzhe.zhong@rivai.ai" , gcc-patches CC: jeffreyalaw , rguenther References: <20231107074451.3990710-1-juzhe.zhong@rivai.ai> <44a77d7b-317e-4f64-a51f-2df49bd32626@codesourcery.com> From: Andrew Stubbs In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00,BODY_8BITS,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,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 List-Id: On 07/11/2023 10:10, juzhe.zhong@rivai.ai wrote: > So, this patch not only fixes RVV FAIL, but also fixes GCN ? Before the patch I have: PASS: gcc.dg/vect/pr97428.c (test for excess errors) PASS: gcc.dg/vect/pr97428.c scan-tree-dump vect "Detected interleaving load of size 8" PASS: gcc.dg/vect/pr97428.c scan-tree-dump vect "Detected interleaving store of size 16" gcc.dg/vect/pr97428.c: pattern found 4 times XFAIL: gcc.dg/vect/pr97428.c scan-tree-dump-times vect "vectorizing stmts using SLP" 2 PASS: gcc.dg/vect/pr97428.c scan-tree-dump-not vect "gap of 6 elements" With the patch I now get: PASS: gcc.dg/vect/pr97428.c (test for excess errors) PASS: gcc.dg/vect/pr97428.c scan-tree-dump vect "Detected interleaving load of size 8" PASS: gcc.dg/vect/pr97428.c scan-tree-dump vect "Detected interleaving store of size 16" gcc.dg/vect/pr97428.c: pattern found 4 times XFAIL: gcc.dg/vect/pr97428.c scan-tree-dump-times vect "vectorizing stmts using SLP" 2 XPASS: gcc.dg/vect/pr97428.c scan-tree-dump-times vect "vectorizing stmts using SLP" 4 PASS: gcc.dg/vect/pr97428.c scan-tree-dump-not vect "gap of 6 elements" It's different, but not "fixed". Andrew > > > ------------------------------------------------------------------------ > juzhe.zhong@rivai.ai > > *From:* Andrew Stubbs > *Date:* 2023-11-07 18:09 > *To:* Juzhe-Zhong ; > gcc-patches@gcc.gnu.org > *CC:* jeffreyalaw@gmail.com ; > rguenther@suse.de > *Subject:* Re: [PATCH] test: Fix FAIL of pr97428.c for RVV > On 07/11/2023 07:44, Juzhe-Zhong wrote: > > This test shows vectorizing stmts using SLP 4 times instead of 2 > for RVV. > > The reason is RVV has 512 bit vector. > > Here is comparison between RVV ans ARM SVE: > > https://godbolt.org/z/xc5KE5rPs > > > > But I notice AMDGCN also has 512 bit vector, seems this patch > will cause FAIL in GCN ? > > > > Not sure whether GCN is 2 times or 4 times ? > The pattern matches 4 times on GCN. > > gcc/testsuite/ChangeLog: > > > > * gcc.dg/vect/pr97428.c: Fix FAIL for RVV. > > > > --- > >   gcc/testsuite/gcc.dg/vect/pr97428.c | 3 ++- > >   1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/gcc/testsuite/gcc.dg/vect/pr97428.c > b/gcc/testsuite/gcc.dg/vect/pr97428.c > > index ad6416096aa..352c9bf04a7 100644 > > --- a/gcc/testsuite/gcc.dg/vect/pr97428.c > > +++ b/gcc/testsuite/gcc.dg/vect/pr97428.c > > @@ -43,5 +43,6 @@ void foo_i2(dcmlx4_t dst[], const dcmlx_t > src[], int n) > >   /* { dg-final { scan-tree-dump "Detected interleaving store of > size 16" "vect" } } */ > >   /* We're not able to peel & apply re-aligning to make accesses > well-aligned for !vect_hw_misalign, > >      but we could by peeling the stores for alignment and > applying re-aligning loads.  */ > > -/* { dg-final { scan-tree-dump-times "vectorizing stmts using > SLP" 2 "vect" { xfail { ! vect_hw_misalign } } } } */ > > +/* { dg-final { scan-tree-dump-times "vectorizing stmts using > SLP" 2 "vect" { xfail { { ! vect_hw_misalign } || { vect512 } } } } } */ > > +/* { dg-final { scan-tree-dump-times "vectorizing stmts using > SLP" 4 "vect" { xfail { { ! vect_hw_misalign } || { ! vect512 } } } > } } */ > >   /* { dg-final { scan-tree-dump-not "gap of 6 elements" "vect" } > } */ >