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 C63853858C52 for ; Fri, 12 Aug 2022 11:27:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C63853858C52 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27CBMYH0030853; Fri, 12 Aug 2022 11:27:39 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3hwnxdr3r8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Aug 2022 11:27:39 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27CBMYKI030771; Fri, 12 Aug 2022 11:27:38 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3hwnxdr3qn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Aug 2022 11:27:38 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27CBLIMx022618; Fri, 12 Aug 2022 11:27:36 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06ams.nl.ibm.com with ESMTP id 3huwvf35dc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Aug 2022 11:27:36 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27CBRYSb20251004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 Aug 2022 11:27:34 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6346BAE04D; Fri, 12 Aug 2022 11:27:34 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5D79CAE045; Fri, 12 Aug 2022 11:27:32 +0000 (GMT) Received: from [9.197.252.68] (unknown [9.197.252.68]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 12 Aug 2022 11:27:32 +0000 (GMT) Message-ID: <9fe90514-fa6c-2634-91e4-0de7e3422dbd@linux.ibm.com> Date: Fri, 12 Aug 2022 19:27:30 +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] vect: Don't allow vect_emulated_vector_p type in vectorizable_call [PR106322] Content-Language: en-US To: Richard Biener Cc: GCC Patches , Richard Sandiford , Andrew Pinski , Uros Bizjak References: From: "Kewen.Lin" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: mvBCBHV5vELSYuOsgEHh9l11PSAgW8-n X-Proofpoint-GUID: mf9F3RsX_6CuBPd2s2hcsMY9A-l7WunE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-12_08,2022-08-11_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 mlxlogscore=628 suspectscore=0 spamscore=0 adultscore=0 phishscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208120031 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, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2022 11:27:43 -0000 on 2022/8/12 19:14, Richard Biener wrote: > On Fri, Aug 12, 2022 at 11:41 AM Kewen.Lin wrote: >> >> Hi, >> >> As PR106322 shows, in some cases for some vector type whose >> TYPE_MODE is a scalar integral mode instead of a vector mode, >> it's possible to obtain wrong target support information when >> querying with the scalar integral mode. For example, for the >> test case in PR106322, on ppc64 32bit vectorizer gets vector >> type "vector(2) short unsigned int" for scalar type "short >> unsigned int", its mode is SImode instead of V2HImode. The >> target support querying checks umul_highpart optab with SImode >> and considers it's supported, then vectorizer further generates >> .MULH IFN call for that vector type. Unfortunately it's wrong >> to use SImode support for that vector type multiply highpart >> here. >> >> This patch is to teach vectorizable_call analysis not to allow >> vect_emulated_vector_p type for both vectype_in and vectype_out >> as Richi suggested. >> >> Bootstrapped and regtested on x86_64-redhat-linux, >> aarch64-linux-gnu and powerpc64{,le}-linux-gnu. >> >> Is it ok for trunk? > > OK for trunk. > >> If it's ok, I guess we want this to be >> backported? > > Yes, but you just missed the RC for 12.2 so please wait until after GCC 12.2 > is released and the branch is open again. The testcase looks mightly > complicated > so fallout there might be well possible as well ;) I suppose it wasn't possible > to craft a simple C testcase after the analysis? Thanks for the hints! Let me give it a try next week and get back to you then. BR, Kewen