public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] middle-end/114189 - drop uses of vcond{,u,eq}_optab
@ 2024-06-14 10:31 Richard Biener
  2024-06-14 11:03 ` Richard Sandiford
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Richard Biener @ 2024-06-14 10:31 UTC (permalink / raw)
  To: gcc-patches
  Cc: hongtao.liu, ebotcazou, krebbel, linkw, syq, xuchenghua, ams,
	richard.sandiford, richard.earnshaw

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.

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.  */
-- 
2.35.3


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-06-21 14:26 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-14 10:31 [PATCH] middle-end/114189 - drop uses of vcond{,u,eq}_optab Richard Biener
2024-06-14 11:03 ` Richard Sandiford
2024-06-14 11:07   ` Richard Biener
2024-06-14 11:11     ` Richard Sandiford
2024-06-14 12:06       ` Richard Biener
2024-06-14 12:10         ` Richard Biener
2024-06-17  9:13           ` Richard Sandiford
2024-06-18  6:17             ` Richard Biener
2024-06-20 18:38               ` Richard Sandiford
2024-06-21  9:53                 ` Richard Biener
2024-06-21 14:26                   ` Richard Sandiford
2024-06-14 14:53 ` Hongtao Liu
2024-06-17  2:59   ` Hongtao Liu
2024-06-14 18:33 ` Xi Ruoyao
2024-06-17  6:00 ` Kewen.Lin
2024-06-17  6:16   ` Richard Biener
2024-06-17  7:27     ` Kewen.Lin
2024-06-17 10:31     ` Stefan Schulze Frielinghaus
2024-06-17 10:16 ` Andrew Stubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).