From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id D3AC33858D39; Wed, 31 Aug 2022 13:59:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D3AC33858D39 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 (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27VDrG7l008693; Wed, 31 Aug 2022 13:59: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=nBlVp91l36m1125+Je98v9FnZrpe7cqhnRkUaOHt+HQ=; b=dNRK1zRdW95oheo781hDnYdSnh+cVO0jzEMClNsZUMHr0CRPVw8ElOmFbl8tfOOOHRnW vcHb4SmBZkL2XW7vgnfSPk3rMZjGaWXML7lkZ+DwaS9KyzmrlEXqfDrepTqy3+lR3Z/B 7cE2GvbuVfqiK8WqPPIsQ5MOSnHdhCgzF4keADcEtNnnN55p/jmCdivXEtPasrm2YL+L +KIz9Axto2LJ5ugUSrsLlQlNsmDsLCfvEY7Fvchq14P/lPeutwV249RRClSUPmCdbsa+ GZsZbcWVeop32s5So99V5t4LidBnhmyEaSHDhAGLLwIhQBCgQJWF1i2Ifrhh2Sxt1jHR UA== Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ja8wy073q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 13:59:58 +0000 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27VDpIjd009066; Wed, 31 Aug 2022 13:59:57 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma04dal.us.ibm.com with ESMTP id 3j7awa1f5j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 13:59:57 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27VDxukT8192742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Aug 2022 13:59:56 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4FFEEBE051; Wed, 31 Aug 2022 14:05:22 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C594CBE04F; Wed, 31 Aug 2022 14:05:21 +0000 (GMT) Received: from [9.160.4.32] (unknown [9.160.4.32]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 31 Aug 2022 14:05:21 +0000 (GMT) Message-ID: <9c6a44db-1239-466a-2990-42207b7eb264@linux.ibm.com> Date: Wed, 31 Aug 2022 08:59:54 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] rs6000: Don't ICE when we disassemble an MMA variable [PR101322] Content-Language: en-US To: "Kewen.Lin" Cc: GCC Patches , Segher Boessenkool References: From: Peter Bergner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: zRfaAdDgUGGSHCWC3hCr5lDPG8IWcNSt X-Proofpoint-ORIG-GUID: zRfaAdDgUGGSHCWC3hCr5lDPG8IWcNSt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-31_08,2022-08-31_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 adultscore=0 impostorscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 mlxlogscore=838 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208310068 X-Spam-Status: No, score=-4.0 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 List-Id: On 8/31/22 4:22 AM, Kewen.Lin wrote: > on 2022/8/27 11:50, Peter Bergner via Gcc-patches wrote: >> - tree src_type = TREE_TYPE (src_ptr); >> + tree src_type = (fncode == RS6000_BIF_DISASSEMBLE_ACC) >> + ? build_pointer_type (vector_quad_type_node) >> + : build_pointer_type (vector_pair_type_node); > > Nit: it seems we can use existing ptr_vector_quad_type_node and ptr_vector_pair_type_node? > I assume the const qualifier is fine since it's for disassembling. That's actually what I started with, but I got some type of gimple verification error which I can't remember what it said. Let me put that back temporarily and I'll grab the error message. >> + if (TREE_TYPE (TREE_TYPE (src_ptr)) != src_type) > > This line looks unexpected, the former is type char while the latter is type __vector_pair *. > > I guess you meant to compare the type of pointer type like: > > TREE_TYPE (TREE_TYPE (src_ptr)) != TREE_TYPE (src_type) > > or even with mode like: > > TYPE_MODE (TREE_TYPE (TREE_TYPE (src_ptr))) != TYPE_MODE (TREE_TYPE (src_type)) Maybe? However, if that is the case, how can it be working for me? Let me throw this in the debugger and verify the types and I'll report back with what I find. >> + src_ptr = build1 (VIEW_CONVERT_EXPR, src_type, src_ptr); > > Nit: NOP_EXPR seems to be better suited here for pointer conversion. NOP_EXPR is new to me (I don't play in the middle-end that often). Let me look around at some other uses of it and I'll give it a try. Thanks! Peter