public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-4406] Fix SIMD call SLP discovery
@ 2023-10-05 11:37 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-10-05 11:37 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6dc44436301143a286e3b45de0673af012299eba

commit r14-4406-g6dc44436301143a286e3b45de0673af012299eba
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Oct 5 10:26:34 2023 +0200

    Fix SIMD call SLP discovery
    
    When we do SLP discovery of SIMD calls we run into the issue that
    when the call is neither builtin nor internal function we have
    cfn == CFN_LAST but internal_fn_p of that returns true.  Since
    IFN_LAST isn't vectorizable we fail spuriously.
    
    Fixed by checking for cfn != CFN_LAST && internal_fn_p (cfn)
    instead.
    
            * tree-vect-slp.cc (vect_build_slp_tree_1): Do not
            ask for internal_fn_p (CFN_LAST).

Diff:
---
 gcc/tree-vect-slp.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index a3e54ebf62a..fa098f9ff4e 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -1084,7 +1084,8 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 	      ldst_p = true;
 	      rhs_code = CFN_MASK_STORE;
 	    }
-	  else if ((internal_fn_p (cfn)
+	  else if ((cfn != CFN_LAST
+		    && internal_fn_p (cfn)
 		    && !vectorizable_internal_fn_p (as_internal_fn (cfn)))
 		   || gimple_call_tail_p (call_stmt)
 		   || gimple_call_noreturn_p (call_stmt)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-05 11:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05 11:37 [gcc r14-4406] Fix SIMD call SLP discovery Richard Biener

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).