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 9F980385DC02; Fri, 3 Apr 2020 21:08:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9F980385DC02 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@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 033L8qtX007836; Fri, 3 Apr 2020 16:08:53 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 033L8qCD007835; Fri, 3 Apr 2020 16:08:52 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 3 Apr 2020 16:08:52 -0500 From: Segher Boessenkool To: luoxhu Cc: gcc-patches@gcc.gnu.org, wschmidt@linux.ibm.com, guojiufu@linux.ibm.com, linkw@gcc.gnu.org Subject: Re: [PATCH] rs6000: Don't split constant oprator when add, move to temp register for future optimization Message-ID: <20200403210852.GK26902@gate.crashing.org> References: <20200326100643.32487-1-luoxhu@linux.ibm.com> <20200327143331.GD22482@gate.crashing.org> <388143a3-7889-0476-abd7-d2e9b667e5f4@linux.ibm.com> <20200402221653.GG26902@gate.crashing.org> <596ce54a-996c-3180-dbf1-df5e94ded4cb@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <596ce54a-996c-3180-dbf1-df5e94ded4cb@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-42.4 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 03 Apr 2020 21:08:55 -0000 Hi! On Fri, Apr 03, 2020 at 02:13:06PM +0800, luoxhu wrote: > Currently 286r.split2 will split "12:%9:DI=0x87654321" to lis+ori by > rs6000_emit_set_const of define_split, do you mean add new define_insn_and_split > to do the split? Another patch to do this after this one goes upstream in stage 1? I mean a splitter that recognises reg := reg + imm for a big immediate, and then does addis+addi again if that is the best way to do it. We expand as a load of the 32-bit constant, which means it can be hoisted just fine, and when we can use paddi we can; but when we cannot, we can still split it again. > > This also links in with Alan's work on big immediates, and with paddi > > insns, etc. > > Seems PR94393? Yes, PR94393. And everything else that will show up if we start pulling at that string (which we should now, btw, for paddi). Segher