]> gcc.gnu.org Git - gcc.git/commitdiff
Fix SIMD call SLP discovery
authorRichard Biener <rguenther@suse.de>
Thu, 5 Oct 2023 08:26:34 +0000 (10:26 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 5 Oct 2023 11:35:14 +0000 (13:35 +0200)
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).

gcc/tree-vect-slp.cc

index a3e54ebf62a29d2ff1c35546a742763c84f2d8b5..fa098f9ff4eaebfaa2083124df11c435519573aa 100644 (file)
@@ -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)
This page took 0.097378 seconds and 5 git commands to generate.