]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/114164 - unsupported SIMD clone call, unsupported VEC_COND
authorRichard Biener <rguenther@suse.de>
Fri, 1 Mar 2024 10:07:21 +0000 (11:07 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 4 Mar 2024 12:38:05 +0000 (13:38 +0100)
The following avoids creating unsupported VEC_COND_EXPRs as part of
SIMD clone call mask argument setup during vectorization which results
in inefficient decomposing of the operation during vector lowering.

PR tree-optimization/114164
* tree-vect-stmts.cc (vectorizable_simd_clone_call): Fail if
the code generated for mask argument setup is not supported.

gcc/tree-vect-stmts.cc

index be0e1a9c69da43f63e79dcd9c05b3a1181426ef1..14a3ffb5f0216ee43aa53961d9582270f4b939c2 100644 (file)
@@ -4210,6 +4210,16 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info,
                                     " supported for mismatched vector sizes.\n");
                  return false;
                }
+             if (!expand_vec_cond_expr_p (clone_arg_vectype,
+                                          arginfo[i].vectype, ERROR_MARK))
+               {
+                 if (dump_enabled_p ())
+                   dump_printf_loc (MSG_MISSED_OPTIMIZATION,
+                                    vect_location,
+                                    "cannot compute mask argument for"
+                                    " in-branch vector clones.\n");
+                 return false;
+               }
            }
          else if (SCALAR_INT_MODE_P (bestn->simdclone->mask_mode))
            {