aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-10-23 11:55:31 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-10-25 11:14:42 +0200
commit07c357eae8df759705057b5d3fefdc52556fc23d (patch)
treea48fce087efefef6d103773cc46a70cae1f2dd10 /gcc
parent7124671cadc5a9f21bb9332b5fd68d29fdcdef52 (diff)
downloadgcc-07c357eae8df759705057b5d3fefdc52556fc23d.zip
gcc-07c357eae8df759705057b5d3fefdc52556fc23d.tar.gz
gcc-07c357eae8df759705057b5d3fefdc52556fc23d.tar.bz2
Relax vect_check_scalar_mask check
When the mask is not a constant or external def there's no need to check the scalar type, in particular with SLP and the mask being a VEC_PERM_EXPR there isn't a scalar operand ready to check (not one vect_is_simple_use will get you). We later check the vector type and reject non-mask types there. * tree-vect-stmts.cc (vect_check_scalar_mask): Only check the scalar type for constant or extern defs.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-vect-stmts.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index ce5289e..9f1449d 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -2520,7 +2520,8 @@ vect_check_scalar_mask (vec_info *vinfo, stmt_vec_info stmt_info,
return false;
}
- if (!VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (*mask)))
+ if ((mask_dt == vect_constant_def || mask_dt == vect_external_def)
+ && !VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (*mask)))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,