The following makes it correctly reject them,
vectorizable_simd_clone_call is solely responsible for them.
PR tree-optimization/121130
* tree-vect-stmts.cc (vectorizable_call): Bail out for
.MASK_CALL.
* gcc.dg/vect/vect-simd-pr121130.c: New testcase.
(cherry picked from commit
a0d2de441ea0898e508c36567fbb77f161afa3c8)
--- /dev/null
+/* { dg-do compile } */
+
+int n2;
+
+__attribute__((simd)) char
+w7(void)
+{
+ short int xb = n2;
+ xb = w7() < 1;
+ return xb;
+}
int mask_opno = -1;
if (internal_fn_p (cfn))
- mask_opno = internal_fn_mask_index (as_internal_fn (cfn));
+ {
+ /* We can only handle direct internal masked calls here,
+ vectorizable_simd_clone_call is for the rest. */
+ if (cfn == CFN_MASK_CALL)
+ return false;
+ mask_opno = internal_fn_mask_index (as_internal_fn (cfn));
+ }
for (i = 0; i < nargs; i++)
{