From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 47E053858C41 for ; Tue, 7 Nov 2023 11:21:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 47E053858C41 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 47E053858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.141.98 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699356095; cv=none; b=tbcA0WYIbx3pomn5pFOZfjcTdEpBwHuUb3MBVNnyoFxQskGPP+UHnURABDasQC+itcppB3PB65j0ozwOjPchv8FYVQUhWN5yHwtkpLdNvZklJzbZSwaB0Wew6u9QW/Kv/OaRqq0Vg+YzjngrtaSVj5nCG50CHlZ5BDXG1sU3ti8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699356095; c=relaxed/simple; bh=obgf1vkrR0N93ZY3dABZm1pe/ipj/NrEQSxKWWxrmJA=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=Z0uyLrFMAiexGjPuT6CaXr+2vegN1ThL9HqcjB1opVcBxxa6xLsJSedc3l5Hafo/pwRvtOhImKt49G8ZkFOimABXlhxY2+l/iZFcl61xvkKtcp1n+60YaBuCOnjFn9m2Dx9zI4hF35iS5aU+P4WMCDySt55lX/mUzubYk0QOYyM= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: +lycbahUTK6QhTMMDjfTng== X-CSE-MsgGUID: WV6Jr54LQO+G3imb69Unag== X-IronPort-AV: E=Sophos;i="6.03,283,1694764800"; d="scan'208";a="24782583" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 07 Nov 2023 03:21:32 -0800 IronPort-SDR: GjTiagW3q6F0HPLrBRMviQC3re4zxgct0Un5dVyIf1twO4MFAbk2dj6sowrv2Fxt4m66IM4Pmx EpPQo0I0T/DIeseM/KxNsOOc4NIQF87kMFn5EiJMaI+7V06iLFM0tg64uGznTJK6pnGou5/l83 iZsqFrlt9x/FJpukPMJYHW5mYxi7kfKu1Dlm9TvoV2L9wWbwNNC/a+TJoVpX+lOS9/KYzIzV4/ 9k4fBQepWxEp2HqicVcd5XW0GMkf/olCzGPcQZas//9WGsRT/RD99/CVrLohYZ8/NfKVZJiGDy B+M= Message-ID: <27d9a815-6483-47dc-9b94-64fcff9d72bd@codesourcery.com> Date: Tue, 7 Nov 2023 11:21:26 +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> <6c2e542d-e41f-4cba-9224-8cb8218d7079@codesourcery.com> <6C8026CC650A3B51+2023110719052047818826@rivai.ai> From: Andrew Stubbs In-Reply-To: <6C8026CC650A3B51+2023110719052047818826@rivai.ai> 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-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00,BODY_8BITS,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_ASCII_DIVIDERS,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 11:05, juzhe.zhong@rivai.ai wrote: > Could you try this ? > > /* { 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 { ! vect512 } } } } */ 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-times vect "vectorizing stmts using SLP" 4 PASS: gcc.dg/vect/pr97428.c scan-tree-dump-not vect "gap of 6 elements" The passes are all correct (assuming that 4 matches are a valid number), but if you have mutliple patterns with contractictory expectations then you probably want to use "target" rather than "xfail" to avoid the noise (and invert the conditions, obviously). Andrew > ------------------------------------------------------------------------ > juzhe.zhong@rivai.ai > > *From:* Andrew Stubbs > *Date:* 2023-11-07 18:59 > *To:* juzhe.zhong@rivai.ai ; > gcc-patches > *CC:* jeffreyalaw ; rguenther > > *Subject:* Re: [PATCH] test: Fix FAIL of pr97428.c for RVV > 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" } > >     } */ > > >