From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 98A073858D32 for ; Mon, 16 Jan 2023 09:21:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 98A073858D32 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 (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30G8YnJu022689; Mon, 16 Jan 2023 09:21:05 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=/ioYMWmOxd/OUUeLj7MvmQ+ewEtdsp3Lzy5D7Il59QI=; b=dZ6u9oFFwxOzLe7lsM0f3wZrYHOugOBA2nBzQS8C0Sg8ThLWlbpkUCm5ROj7rTD7OIpO yUibicrHtelqYOqDkSUl6OlSer6i4VngqnoY0Z6quOkWveAiYbCQpdsgU9czugqFkpni WuL2uVTNAtmFK51QG947PuFZjl8G6KLjgtrcGlflD3pgjNwmVYFpJXFBkrZL/x3XC2IS Dbt9A0M5TVRoshFWwdzW6RavmaBTNXnVMNcLGKycABvLJnFnfm04V2AxXgNB96zX3K1f vlEbpZAffrbtAW3pZu9KtHDnCFgcU/6jj0K+cU6kurohfw9OMOv2HcpQK8wx02x/We66 Pw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n4g07u9hv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Jan 2023 09:21:04 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30G9JT2R005551; Mon, 16 Jan 2023 09:21:04 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n4g07u9h1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Jan 2023 09:21:04 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30FIgFol014427; Mon, 16 Jan 2023 09:21:02 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma05fra.de.ibm.com (PPS) with ESMTPS id 3n3m169jrq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Jan 2023 09:21:02 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30G9L06m48759208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Jan 2023 09:21:00 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 13C6920040; Mon, 16 Jan 2023 09:21:00 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5329A20049; Mon, 16 Jan 2023 09:20:58 +0000 (GMT) Received: from [9.200.38.48] (unknown [9.200.38.48]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 16 Jan 2023 09:20:57 +0000 (GMT) Message-ID: Date: Mon, 16 Jan 2023 17:20:56 +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] rs6000: Teach rs6000_opaque_type_invalid_use_p about gcall [PR108348] Content-Language: en-US To: Segher Boessenkool Cc: GCC Patches , David Edelsohn , Peter Bergner References: <1ea87e1b-7caf-59dd-ff1a-8f282a2dae14@linux.ibm.com> <20230116084907.GE25951@gate.crashing.org> From: "Kewen.Lin" In-Reply-To: <20230116084907.GE25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 5VZN9su-QZcl4Esid_GqozVwD7k32Gw7 X-Proofpoint-GUID: jblfgyLyeW536JHY65BVHLklrh8qldk2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-16_07,2023-01-13_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 malwarescore=0 spamscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=720 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301160062 X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,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 Segher, Thanks for the review comments! on 2023/1/16 16:49, Segher Boessenkool wrote: > Hi! > > On Mon, Jan 16, 2023 at 04:33:36PM +0800, Kewen.Lin wrote: >> PR108348 shows one special case that MMA opaque types are >> used in function arguments and treated as pass by reference, >> it results in one copying from argument to a temp variable, >> since this copying happens before rs6000_function_arg check, >> it can cause ICE without MMA support then. This patch is to >> teach function rs6000_opaque_type_invalid_use_p to check if >> any function argument in a gcall stmt has the invalid use of >> MMA opaque types. >> >> btw, I checked the handling on return value, it doesn't have >> this kind of issue as its checking and error emission is quite >> early, so this doesn't handle function return value. >> >> Bootstrapped and regtested on powerpc64-linux-gnu P8 and >> powerpc64le-linux-gnu P9 and P10. >> >> I'm going to push this soon if no objections. > > Looks okay. Some testcase stuff though: > >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/powerpc/pr108348-1.c >> @@ -0,0 +1,23 @@ >> +/* { dg-require-effective-target powerpc_p9modulo_ok } */ > > Please use a saner selector? If one doesn't exist yet, make a new one? > Something that just says "p9", not "modulo". The has_arch_pwr9 looks not suitable here as it doesn't check the assembler behavior? Do you have some instruction in mind for being used as the tested instruction mnemonic like modsw? Maybe later we can deprecate -mmodulo like we get rid of -mdirect-move, then we can rename p9modulo_ok to p9_ok here? :) BR, Kewen