From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id B71A23858D32; Thu, 6 Apr 2023 06:49:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B71A23858D32 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 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3364fRiJ012995; Thu, 6 Apr 2023 06:48:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=kLeM9DzEp+nJ30FJI8zsfgB8Fz3th0mICPNzokCLWgo=; b=D8oZc93l6OYNsHcSolDCKHK+79t98iS9pHklF8pSPPSnIR+RKyS6NMTNS2+iz71WV83H KUruek2tzglxaM0OehtusklsM0/SmDvYD3ntiiJyA9RM8XFs+m4SKHv/NsnV2ovy26UE ih0bwrYp07Z2SRPVhhZtULrgFi5Rv91bDuCFRu6N0y3iR11D6og9LL9mZc2cH2DuF/Dr kpQaevKKoqMDMPsK46L5a8qei0Xj2jgYT9FO+vIJ95oHzegpZ8eUcelsR6OwcQiWQf41 jr4QVOoybTnae8M2bxK2P0jpnRNb6KsHyL/6o7pBM83B2ryD0Kjcom0pRE04dTJUNhNG jQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3ps8w8ew9e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Apr 2023 06:48:57 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3366cGM4025669; Thu, 6 Apr 2023 06:48:57 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3ps8w8ew8v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Apr 2023 06:48:57 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3360suEc024478; Thu, 6 Apr 2023 06:48:55 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3ppbvfu1v7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Apr 2023 06:48:55 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3366mqQF7864928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Apr 2023 06:48:52 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B9A4220043; Thu, 6 Apr 2023 06:48:52 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 90C2A20040; Thu, 6 Apr 2023 06:48:50 +0000 (GMT) Received: from [9.43.168.53] (unknown [9.43.168.53]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 6 Apr 2023 06:48:50 +0000 (GMT) Message-ID: <1fc4122d-98b0-8af1-5562-ff20136eac2b@linux.ibm.com> Date: Thu, 6 Apr 2023 14:48:49 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH] [testsuite] [ppc] expect vectorization in gen-vect-11c.c Content-Language: en-US To: Alexandre Oliva Cc: Rainer Orth , Mike Stump , David Edelsohn , Segher Boessenkool , Kewen Lin , gcc-patches@gcc.gnu.org References: <2628ca10-9e16-51fc-91a0-8ff548657cc6@linux.ibm.com> From: "Kewen.Lin" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Lp91frkVYUNKl3Zc7BxaHrkGmZylEI19 X-Proofpoint-ORIG-GUID: K2zGymoQ42rXboSy0dMbJOOZJ3ttLUFw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-06_02,2023-04-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 spamscore=0 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304060057 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,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 List-Id: Hi Alexandre, on 2023/4/6 13:20, Alexandre Oliva wrote: > Hello, Kewen, > > On Mar 27, 2023, "Kewen.Lin" wrote: > >> on 2023/3/25 16:35, Alexandre Oliva wrote: > >>> The first loop in main gets stores "vectorized" on powerpc into >>> full-word stores, even without any vector instruction support, so the >>> test's expectation of no loop vectorization is not met. > >> I think this test issue has been gone since r13-5771-gdc87e1391c55c6. > > That patch has been backported to gcc-12 as r12-9258-g21e7145aaf582c. > >> Could you have a double check? > > I confirm I observe the problem with gcc-12 targeting ppc64-vx7r2, > containing the backported patch, and that the loop is vectorized, > failing the test. Thanks for confirming! Sorry that I didn't have a vxworks env to reproduce this locally, but I guessed that vxworks env doesn't have its specific configurations on vectorization?, so I tried to reproduce this on a env with powerpc64-linux-gnu, with the latest gcc-12 branch (r12-9388), I still saw it passed with vect dumping: gen-vect-11c.c:26:17: note: ==> examining statement: _3 = _1 + _2; gen-vect-11c.c:26:17: note: vect_is_simple_use: operand ib[i_24], type of def: internal gen-vect-11c.c:26:17: note: vect_is_simple_use: vectype vector(2) int gen-vect-11c.c:26:17: note: vect_is_simple_use: operand ic[i_24], type of def: internal gen-vect-11c.c:26:17: note: vect_is_simple_use: vectype vector(2) int not using word mode for +- and less than four vector elements gen-vect-11c.c:28:21: missed: not vectorized: relevant stmt not supported: _3 = _1 + _2; gen-vect-11c.c:26:17: missed: bad operation or unsupported loop bound. gen-vect-11c.c:26:17: note: ***** Analysis failed with vector mode DI gen-vect-11c.c:26:17: missed: couldn't vectorize loop gen-vect-11c.c:18:5: note: vectorized 0 loops in function. By reverting r12-9258-g21e7145aaf582c, I saw it failed with dumping: gen-vect-11c.c:26:17: note: ==> examining statement: _3 = _1 + _2; gen-vect-11c.c:26:17: note: vect_is_simple_use: operand ib[i_24], type of def: internal gen-vect-11c.c:26:17: note: vect_is_simple_use: vectype vector(2) int gen-vect-11c.c:26:17: note: vect_is_simple_use: operand ic[i_24], type of def: internal gen-vect-11c.c:26:17: note: vect_is_simple_use: vectype vector(2) int ... gen-vect-11c.c:26:17: note: ***** Analysis succeeded with vector mode DI gen-vect-11c.c:26:17: note: ***** Choosing vector mode DI gen-vect-11c.c:26:17: optimized: loop vectorized using 8 byte vectors > > > It's unfortunately not viable for me to test GCC trunk with vxworks, so > my testing with it is limited to earlier GCC versions, that we (AdaCore) > have already ported or are in the process of porting. I make up for > that by testing trunk with other target variants, to the best of my > abilities, to avoid regressions, but sometimes I just can't tell whether > my baseline for regression testing doesn't contain a failure because > there's another fix, or because it just doesn't fail on that target > variant. > > > In this case, the comments in the patch you mentioned don't seem to > match the situation at hand: the SImode stores vectorized into V2SImode > (DImode) seem profitable and are *not* split by vector lowering. > Yeah, but the case also have "+" (PLUS), it results in a unvectorized decision as the above dumping, I'm not quite sure what's the difference between our ENVs and something caused that you didn't see the above analysis failure on your side, do you mind to have a further check? BR, Kewen