]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/112450 - avoid AVX512 style masking for BImode masks
authorRichard Biener <rguenther@suse.de>
Thu, 9 Nov 2023 10:44:07 +0000 (11:44 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 9 Nov 2023 11:33:21 +0000 (12:33 +0100)
The following avoids running into the AVX512 style masking code for
RVV which would theoretically be able to handle it if I were not
relying on integer mode maskness in vect_get_loop_mask.  While that's
easy to fix (patch in PR), the preference is to not have AVX512 style
masking for RVV, thus the following.

* tree-vect-loop.cc (vect_verify_full_masking_avx512):
Check we have integer mode masks as required by
vect_get_loop_mask.

gcc/tree-vect-loop.cc

index a544bc9b0599fb6aa3de951dd0e0e3c07c4a64c4..8abc1937d740e57b7467539f48339914a0f8b945 100644 (file)
@@ -1462,7 +1462,10 @@ vect_verify_full_masking_avx512 (loop_vec_info loop_vinfo)
       if (!mask_type)
        continue;
 
-      if (TYPE_PRECISION (TREE_TYPE (mask_type)) != 1)
+      /* For now vect_get_loop_mask only supports integer mode masks
+        when we need to split it.  */
+      if (GET_MODE_CLASS (TYPE_MODE (mask_type)) != MODE_INT
+         || TYPE_PRECISION (TREE_TYPE (mask_type)) != 1)
        {
          ok = false;
          break;