https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112661

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 4a09b3c2aca..d0967240ae3 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -766,7 +766,10 @@ vect_get_and_check_slp_defs (vec_info *vinfo, unsigned
char swap,
          if ((dt == vect_constant_def
               || dt == vect_external_def)
              && !GET_MODE_SIZE (vinfo->vector_mode).is_constant ()
-             && TREE_CODE (type) != BOOLEAN_TYPE
+             && (!is_gimple_call (stmt_info->stmt)
+                 || !gimple_call_internal_p (stmt_info->stmt)
+                 || internal_fn_mask_index
+                      (gimple_call_internal_fn (stmt_info->stmt)) != opno)
              && !can_duplicate_and_interleave_p (vinfo, stmts.length (),
type))
            {
              if (dump_enabled_p ())

fixes the testcase, not sure if it still resolves the issue fixed with the
original change.

Reply via email to