From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 6D47A3882100; Fri, 14 Jun 2024 11:07:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D47A3882100 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6D47A3882100 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718363237; cv=none; b=LCm8xAbIeq4XaCnlsvjHRGoN0KUs02AyCQRsjvTqcWQQbZvUPzU9pVXcjJo23ytOgqkV5LAJTy2/K0+TJWaq2FgMAPmT4mjA++/U0VCungZdtFWih4Cnk1Ra75cWbuEcRmzqoR4E+2cM7xAIJ2F0VD646PwZj0Pb1vESq3r6o/U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718363237; c=relaxed/simple; bh=M/ZhfF9cumrobns6v4OiNi2KoiNDkjWB5os4z09otho=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date: From:To:Subject:Message-ID:MIME-Version; b=rg4IP6FyvTmEMPO24CL1Oy7QEqTWPx+vJr5w04FHw8bn8oK6s/Iy0Dbrqc23ZQCbkYSg5sNOM5yWgIz++gAQMvc6AiduZ46H5AG5otfp1cIdNwfZuAAHsDDkm8OxseowSbJscWZcIB4bYiZeKM0H/u9/fZjuXQ/buXkOtGC+QQM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from murzim.nue2.suse.org (unknown [10.168.4.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 73FF433705; Fri, 14 Jun 2024 11:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1718363234; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cEyaiZu/t9jwovPPs8uzvP3MEOzF5ODLs1JbL9yFE7o=; b=ldjRrrPrb+B9NpHt7F+2rqAc9WrTrPTacVGtg4X54jZgxqymIjmd4d7cduIH+TH4gTDHMr Vyw6yPE852WDWXKyqIZnr77vY80Ex9fGkEpvvBRmpcjhGeBZwcjeC3Vp6uwk2YY81QwVvo JdIHefg54ggJEmcRNV04eiJrxxQsOEM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1718363234; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cEyaiZu/t9jwovPPs8uzvP3MEOzF5ODLs1JbL9yFE7o=; b=g2pjivfEN8wsMangU8UfbByEx5Ux3A6IPMmtx8s72T8+UDa5sxbf3TmVfkxC/3WVj82Ty6 bNQSmt1uB4fzqeDQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1718363234; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cEyaiZu/t9jwovPPs8uzvP3MEOzF5ODLs1JbL9yFE7o=; b=ldjRrrPrb+B9NpHt7F+2rqAc9WrTrPTacVGtg4X54jZgxqymIjmd4d7cduIH+TH4gTDHMr Vyw6yPE852WDWXKyqIZnr77vY80Ex9fGkEpvvBRmpcjhGeBZwcjeC3Vp6uwk2YY81QwVvo JdIHefg54ggJEmcRNV04eiJrxxQsOEM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1718363234; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cEyaiZu/t9jwovPPs8uzvP3MEOzF5ODLs1JbL9yFE7o=; b=g2pjivfEN8wsMangU8UfbByEx5Ux3A6IPMmtx8s72T8+UDa5sxbf3TmVfkxC/3WVj82Ty6 bNQSmt1uB4fzqeDQ== Date: Fri, 14 Jun 2024 13:07:14 +0200 (CEST) From: Richard Biener To: Richard Sandiford cc: gcc-patches@gcc.gnu.org, hongtao.liu@intel.com, ebotcazou@libertysurf.fr, krebbel@linux.ibm.com, linkw@gcc.gnu.org, syq@gcc.gnu.org, xuchenghua@loongson.cn, ams@baylibre.com, richard.earnshaw@arm.com Subject: Re: [PATCH] middle-end/114189 - drop uses of vcond{,u,eq}_optab In-Reply-To: Message-ID: References: <20240614103115.1DB0213AB1@imap1.dmz-prg2.suse.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spamd-Result: default: False [-4.29 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.19)[-0.967]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_SEVEN(0.00)[10]; RCVD_COUNT_ZERO(0.00)[0]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email] X-Spam-Score: -4.29 X-Spam-Level: X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Fri, 14 Jun 2024, Richard Sandiford wrote: > Richard Biener writes: > > The following retires vcond{,u,eq} optabs by stopping to use them > > from the middle-end. Targets instead (should) implement vcond_mask > > and vec_cmp{,u,eq} optabs. The PR this change refers to lists > > possibly affected targets - those implementing these patterns, > > and in particular it lists mips, sparc and ia64 as targets that > > most definitely will regress while others might simply remove > > their vcond{,u,eq} patterns. > > > > I'd appreciate testing, I do not expect fallout for x86 or arm/aarch64. > > I know riscv doesn't implement any of the legacy optabs. But less > > maintained vector targets might need adjustments. > > > > I want to get rid of those optabs for GCC 15. If I don't hear from > > you I will assume your target is fine. > > Great! Thanks for doing this. > > Is there a plan for how we should handle vector comparisons that > have to be done as the inverse of the negated condition? Should > targets simply not provide vec_cmp for such conditions and leave > the target-independent code to deal with the fallout? (For a > standalone comparison, it would invert the result. For a VEC_COND_EXPR > it would swap the true and false values.) I would expect that the ISEL pass which currently deals with finding valid combos of .VCMP{,U,EQ} and .VCOND_MASK deals with this. So how do we deal with this right now? I expect RTL expansion will do the inverse trick, no? Thanks, Richard. > Richard > > > > > Thanks, > > Richard. > > > > PR middle-end/114189 > > * optabs-query.h (get_vcond_icode): Always return CODE_FOR_nothing. > > (get_vcond_eq_icode): Likewise. > > --- > > gcc/optabs-query.h | 13 ++++--------- > > 1 file changed, 4 insertions(+), 9 deletions(-) > > > > diff --git a/gcc/optabs-query.h b/gcc/optabs-query.h > > index 0cb2c21ba85..31fbce80175 100644 > > --- a/gcc/optabs-query.h > > +++ b/gcc/optabs-query.h > > @@ -112,14 +112,9 @@ get_vec_cmp_eq_icode (machine_mode vmode, machine_mode mask_mode) > > mode CMODE, unsigned if UNS is true, resulting in a value of mode VMODE. */ > > > > inline enum insn_code > > -get_vcond_icode (machine_mode vmode, machine_mode cmode, bool uns) > > +get_vcond_icode (machine_mode, machine_mode, bool) > > { > > - enum insn_code icode = CODE_FOR_nothing; > > - if (uns) > > - icode = convert_optab_handler (vcondu_optab, vmode, cmode); > > - else > > - icode = convert_optab_handler (vcond_optab, vmode, cmode); > > - return icode; > > + return CODE_FOR_nothing; > > } > > > > /* Return insn code for a conditional operator with a mask mode > > @@ -135,9 +130,9 @@ get_vcond_mask_icode (machine_mode vmode, machine_mode mmode) > > mode CMODE (only EQ/NE), resulting in a value of mode VMODE. */ > > > > inline enum insn_code > > -get_vcond_eq_icode (machine_mode vmode, machine_mode cmode) > > +get_vcond_eq_icode (machine_mode, machine_mode) > > { > > - return convert_optab_handler (vcondeq_optab, vmode, cmode); > > + return CODE_FOR_nothing; > > } > > > > /* Enumerates the possible extraction_insn operations. */ > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)