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 E79E83875A22 for ; Fri, 24 Jun 2022 16:50:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E79E83875A22 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 25OGnIS4021174; Fri, 24 Jun 2022 11:49:18 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 25OGnHYA021173; Fri, 24 Jun 2022 11:49:17 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 24 Jun 2022 11:49:17 -0500 From: Segher Boessenkool To: "Kewen.Lin" Cc: Peter Bergner , GCC Patches , David Edelsohn , will schmidt Subject: Re: [PATCH v3] rs6000: Adjust mov optabs for opaque modes [PR103353] Message-ID: <20220624164917.GX25951@gate.crashing.org> References: <09c34b29-feea-d26e-2c4f-5e096ab286bc@linux.ibm.com> <20220623190619.GU25951@gate.crashing.org> <6ded988f-6684-e42e-ca82-d81ff55178d2@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ded988f-6684-e42e-ca82-d81ff55178d2@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.2 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 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, 24 Jun 2022 16:50:20 -0000 Hi! On Fri, Jun 24, 2022 at 09:03:59AM +0800, Kewen.Lin wrote: > on 2022/6/24 03:06, Segher Boessenkool wrote: > > On Wed, May 18, 2022 at 10:07:48PM +0800, Kewen.Lin wrote: > >> As PR103353 shows, we may want to continue to expand a MMA built-in > >> function like a normal function, even if we have already emitted > >> error messages about some missing required conditions. As shown in > >> that PR, without one explicit mov optab on OOmode provided, it would > >> call emit_move_insn recursively. > > > > First off: lxvp is a VSX insn, not an MMA insn. So please don't call it > > that -- this confusion is what presumably caused the problem here, so it > > would be good to root it out :-) > > I guess the "it" in "don't call it call" is for "MMA built-in function"? > It comes from the current code: Your proposed commit message says "MMA built-in function". It is not an MMA builtin, or rather, it should not be. > >> + /* Opaque modes are only expected to be available when MMA is supported, > > > > Why do people expect that? It is completely wrong. The name "opaque" > > itself already says this is not just for MMA, but perhaps more > > importantly, it is a basic VSX insn, doesn't touch any MMA resources, > > and is useful in other contexts as well. > > ... The above statements are also based on current code, for now, the > related things like built-in functions, mov optab, hard_regno_ok etc. > for these two modes are guarded by TARGET_MMA. Opaque modes are a generic thing, not an rs6000 thing. It is important not to conflate completely different things that just happened to coincide some months ago (but not anymore right now even!) > I think I get your points here, you want to separate these opaque > modes from MMA since the underlying lxvp/stxvp are not MMA specific, > so those related things (bifs, mov optabs etc.) are not necessarily > guarded under MMA. Yup. This can take some time of course, but in the mean time we should stop pretending the status quo is correct. > > So this needs some bigger surgery. > > Yes, Peter may have more comments on this. Yes. Can you do a patch that just fixes this PR103353, without adding more misleading comments? :-) Segher