From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 755F0385800F for ; Wed, 31 Aug 2022 20:52:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 755F0385800F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 27VKpQPC014954; Wed, 31 Aug 2022 15:51:26 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 27VKpQJN014953; Wed, 31 Aug 2022 15:51:26 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 31 Aug 2022 15:51:26 -0500 From: Segher Boessenkool To: Peter Bergner Cc: "Kewen.Lin" , GCC Patches Subject: Re: [PATCH] rs6000: Don't ICE when we disassemble an MMA variable [PR101322] Message-ID: <20220831205126.GU25951@gate.crashing.org> References: <9c6a44db-1239-466a-2990-42207b7eb264@linux.ibm.com> <6cf4ceb2-9deb-93b4-bd94-ab08c08eb330@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6cf4ceb2-9deb-93b4-bd94-ab08c08eb330@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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 Wed, Aug 31, 2022 at 01:53:48PM -0500, Peter Bergner wrote: > ...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? > 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. > FYI, here is the current code patch with all of the suggested changes incorporated: > --- a/gcc/config/rs6000/rs6000-builtin.cc > +++ b/gcc/config/rs6000/rs6000-builtin.cc > @@ -1085,7 +1085,11 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi, > unsigned nvec = (fncode == RS6000_BIF_DISASSEMBLE_ACC) ? 4 : 2; > tree dst_ptr = gimple_call_arg (stmt, 0); > tree src_ptr = gimple_call_arg (stmt, 1); > - 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. Segher