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 7A7393858C55 for ; Wed, 31 Aug 2022 22:01:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A7393858C55 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 (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27VLk6OS015587; Wed, 31 Aug 2022 22:01:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=p5o/vOffPtOJ2UwPkNRlTfcXb3PQDLrpxqpc2AZ37ss=; b=ovg/QcsxiWYyqsysvsjJJGxi1O4pqxO/9nPuiMtmbPYiRkMxEXzE51n6FJYlVQ61BX/I Vf7DG1be2V7iRYGaxmcRQQy1XHrOVysR+gkgs2zybVQ86Uebkbzf0444zHliPTN6p5l1 7hF8KQalybwi8P3KrmSpYI5dBFNS8MVIVWdpiYo9Cw53/4KzY9TYT4qhinkgL41JJLIr HxC6aAOxm92dxhOmeu5sZ1kRz5/o6FvYwR9GV2KW6U43ZpROekd6ncJJPjez+avJHHHi z1p3OZe/UboCmGg4WFo071H9vAQuaNrZ/x4qZYv8vb0vK3U4HkFFdC+XsFX14gczpu78 WQ== 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 3jafubgd2h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 22:01:07 +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 27VLpHCW008222; Wed, 31 Aug 2022 22:01:07 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma04dal.us.ibm.com with ESMTP id 3j7awa4ahd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 22:01:06 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27VM155h29163828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Aug 2022 22:01:05 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8290EBE061; Wed, 31 Aug 2022 22:06:45 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E964ABE05A; Wed, 31 Aug 2022 22:06:44 +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 22:06:44 +0000 (GMT) Message-ID: <67da6fae-184d-4414-cb04-53e295abc477@linux.ibm.com> Date: Wed, 31 Aug 2022 17:01:04 -0500 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: Segher Boessenkool Cc: "Kewen.Lin" , GCC Patches References: <9c6a44db-1239-466a-2990-42207b7eb264@linux.ibm.com> <6cf4ceb2-9deb-93b4-bd94-ab08c08eb330@linux.ibm.com> <20220831205126.GU25951@gate.crashing.org> From: Peter Bergner In-Reply-To: <20220831205126.GU25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: NoxNGpc-1lOujtxS-7FpjAY78U5OlTPU X-Proofpoint-ORIG-GUID: NoxNGpc-1lOujtxS-7FpjAY78U5OlTPU Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 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_14,2022-08-31_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 malwarescore=0 adultscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 phishscore=0 impostorscore=0 mlxscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208310105 X-Spam-Status: No, score=-3.7 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,T_SCC_BODY_TEXT_LINE,WEIRD_PORT 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 3:51 PM, Segher Boessenkool wrote: > On Wed, Aug 31, 2022 at 01:53:48PM -0500, Peter Bergner wrote: >> Question for my own education, when would you use VIEW_CONVERT_EXPR over NOP_EXPR? > > VIEW_CONVERT_EXPR is essentially a bit_cast. Only use it when you need > that, it is sub-optimal if you don't. Ok. I believe I added a couple of other similar uses of VIEW_CONVERT_EXPR for pointer casts on the __builtin_vsx_lxvp/stxvp built-ins. I'll try converting those to use NOP_EXPR too in a separate cleanup patch. Thanks! >> - tree src_type = TREE_TYPE (src_ptr); >> + tree src_type = (fncode == RS6000_BIF_DISASSEMBLE_ACC) >> + ? ptr_vector_quad_type_node : ptr_vector_pair_type_node; > > If you split a?b:c over multiple lines, please make it three lines. Can do, however... >> ...and of course, now I can't recreate that issue at all and the >> ptr_vector_*_type use work fine now. Strange! ...so ok, changed. >> Maybe the behavior changed since my PR106017 fix went in??? > > That is my best guess as well. But, how did that help this test? It didn't. :-) During my bootstrap, I hit the gimple verification issue I mentioned seeing earlier. My problem was I thought I hit it with the test case, but it was exposed on a different test case in the testsuite. Here's what I'm seeing, which only happens when using -O0 -flto: rain6p1% gcc -O0 -mcpu=power10 -flto pr102347.c lto1: internal compiler error: in gimple_canonical_types_compatible_p, at tree.cc:13677 0x11930a97 gimple_canonical_types_compatible_p(tree_node const*, tree_node const*, bool) /home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/tree.cc:13677 0x1192f1ab verify_type_variant /home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/tree.cc:13377 0x11930beb verify_type(tree_node const*) /home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/tree.cc:13700 0x106bbd37 lto_fixup_state /home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/lto/lto-common.cc:2629 0x106bbff3 lto_fixup_decls /home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/lto/lto-common.cc:2660 0x106bce13 read_cgraph_and_symbols(unsigned int, char const**) /home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/lto/lto-common.cc:2901 0x1067bcbf lto_main() /home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/lto/lto.cc:656 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. lto-wrapper: fatal error: /home/bergner/gcc/build/gcc-fsf-mainline-pr101322-debug/gcc/xgcc returned 1 exit status compilation terminated. /home/bergner/binutils/install/binutils-power10/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status The problem goes away if I use use -O1 or above, I drop -flto or I use the code I originally posted without the ptr_vector_*_type The assert in gimple_canonical_types_compatible_p() we're hitting is: 13673 default: 13674 /* Consider all types with language specific trees in them mutually 13675 compatible. This is executed only from verify_type and false 13676 positives can be tolerated. */ 13677 gcc_assert (!in_lto_p); 13678 return true; I have no idea why ptr_vector_*_type would behave differently here than build_pointer_type (vector_*_type_node). Using the build_pointer_type() fixed it for me, so that's why I went with it. :-) Maybe this is a bug in lto??? Peter