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 EED993858D35 for ; Wed, 15 Feb 2023 09:51:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EED993858D35 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 31F9otcN002511; Wed, 15 Feb 2023 03:50:55 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 31F9osAM002509; Wed, 15 Feb 2023 03:50:54 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 15 Feb 2023 03:50:54 -0600 From: Segher Boessenkool To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org Subject: Re: [committed] powerpc: Fix up expansion for WIDEN_MULT_PLUS_EXPR [PR108787] Message-ID: <20230215095054.GF25951@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP 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: Hi! On Wed, Feb 15, 2023 at 10:18:29AM +0100, Jakub Jelinek wrote: > If we wanted to get back the signed op1 * op2 + op3 all in the DImode > into TImode op0, we'd need to introduce a new tree code next to > WIDEN_MULT_PLUS_EXPR and maddMN4 expander, because I'm afraid it can't > be done at expansion time in maddMN4 expander to detect whether the > operand is sign extended especially because of SUBREGs and the awkwardness > of looking at earlier emitted instructions, and combine would need 5 > instruction combination. The machine insns we have are like they are just for symmetry as far as I can see, they aren't all so handy to use, don't worry about it :-) Nicer for software insns have two registers in for the addend (either as 64-bit, or as two addends), but that is not so nice for hardware. > Bootstrapped/regtested on powerpc64-linux (power7, tested -m32/-m64), > powerpc64le-linux (power8 and another on power9 with > --with-cpu-64=power9 --with-tune-64=power9), preapproved by Segher in the > PR, committed to trunk. Thanks again :-) Segher