diff options
author | Richard Biener <rguenther@suse.de> | 2023-10-05 10:26:34 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2023-10-05 13:35:14 +0200 |
commit | 6dc44436301143a286e3b45de0673af012299eba (patch) | |
tree | 2af155328cf2ebb77c61a27a8e877c0ccfe936e5 | |
parent | b583a2940af90d03f535648fef111cb158933f7d (diff) | |
download | gcc-6dc44436301143a286e3b45de0673af012299eba.zip gcc-6dc44436301143a286e3b45de0673af012299eba.tar.gz gcc-6dc44436301143a286e3b45de0673af012299eba.tar.bz2 |
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).
-rw-r--r-- | gcc/tree-vect-slp.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index a3e54eb..fa098f9 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) |