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 6CFE2385840C for ; Mon, 11 Apr 2022 15:43:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6CFE2385840C 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 23BFgFMn017174; Mon, 11 Apr 2022 10:42:15 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 23BFgEu8017172; Mon, 11 Apr 2022 10:42:14 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 11 Apr 2022 10:42:14 -0500 From: Segher Boessenkool To: "Kewen.Lin" Cc: Jakub Jelinek , Bill Schmidt , Peter Bergner , GCC Patches , David Edelsohn Subject: Re: [PATCH] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} under hard float [PR103623] Message-ID: <20220411154214.GW614@gate.crashing.org> References: <20220407110952.GM614@gate.crashing.org> <20220408173105.GU614@gate.crashing.org> <31b02ece-83e3-f940-8898-c0a9c19c38bd@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31b02ece-83e3-f940-8898-c0a9c19c38bd@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 11 Apr 2022 15:43:20 -0000 Hi! On Mon, Apr 11, 2022 at 04:29:40PM +0800, Kewen.Lin wrote: > on 2022/4/9 1:31 AM, Segher Boessenkool wrote: > > On Fri, Apr 08, 2022 at 10:09:44AM +0800, Kewen.Lin wrote: > > For me it fails during combine: the unspec suddenly doesn't recog > > anymore. That might be that "d" thing yes, that is problematical. > > > > I must miss something, I found in combine pass we still have the > the insn_code unpacktf_nodm (recog-ed). That is recognised many passes earlier though. When combine runs it will ICE because recog failed (for powerpc64-linux anyway, everything default, no -mcpu= etc.). > > Or, try this patch? > > > > === > > diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md > > index fdfbc6566a5c..f05b8358ba0a 100644 > > --- a/gcc/config/rs6000/rs6000.md > > +++ b/gcc/config/rs6000/rs6000.md > > @@ -14580,10 +14580,10 @@ (define_insn_and_split "unpack_dm" > > [(set_attr "type" "fp,fpstore,mtvsr,mfvsr,store")]) > > > > (define_insn_and_split "unpack_nodm" > > - [(set (match_operand: 0 "nonimmediate_operand" "=d,m") > > + [(set (match_operand: 0 "nonimmediate_operand" "=d,m,m") > > (unspec: > > - [(match_operand:FMOVE128 1 "register_operand" "d,d") > > - (match_operand:QI 2 "const_0_to_1_operand" "i,i")] > > + [(match_operand:FMOVE128 1 "register_operand" "d,d,r") > > + (match_operand:QI 2 "const_0_to_1_operand" "i,i,i")] > > UNSPEC_UNPACK_128BIT))] > > "(!TARGET_POWERPC64 || !TARGET_DIRECT_MOVE) && FLOAT128_2REG_P (mode)" > > "#" > > @@ -14600,7 +14600,7 @@ (define_insn_and_split "unpack_nodm" > > > > operands[3] = gen_rtx_REG (mode, fp_regno); > > } > > - [(set_attr "type" "fp,fpstore")]) > > + [(set_attr "type" "fp,fpstore,store")]) > > > > (define_insn_and_split "pack" > > [(set (match_operand:FMOVE128 0 "register_operand" "=&d") > > === > > > > > > Nice, I confirmed this makes ICE gone, I've filed one new PR > PR105213 for GCC13 further tracking by associating this patch there. Cool, I'll commit it later today then (after a final regstrap). The _nodm pattern just missed the alternative for no FP regs (the _dm pattern has it, so just an oversight). Segher