aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-slp.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-10-14 15:04:24 +0200
committerRichard Biener <rguenther@suse.de>2020-10-14 16:27:03 +0200
commitea9535e75e9118493879cb76520c85272981ebda (patch)
treef8c6ab3a5c4b6672db5a373cacd8083dc2e9a0ed /gcc/tree-vect-slp.c
parentc602426cc72a5ac89efac61a195ee38358688c1d (diff)
downloadgcc-ea9535e75e9118493879cb76520c85272981ebda.zip
gcc-ea9535e75e9118493879cb76520c85272981ebda.tar.gz
gcc-ea9535e75e9118493879cb76520c85272981ebda.tar.bz2
More vect_get_and_check_slp_defs refactoring
This is another tiny piece in some bigger refactoring of vect_get_and_check_slp_defs. Split out a test that has nothing to do with def types or commutation. 2020-10-14 Richard Biener <rguenther@suse.de> * tree-vect-slp.c (vect_get_and_check_slp_defs): Split out test for compatible operand types.
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r--gcc/tree-vect-slp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index ba681fe..5e0a360 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -486,6 +486,14 @@ again:
}
else
{
+ if (!types_compatible_p (oprnd_info->first_op_type, type))
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "Build SLP failed: different operand types\n");
+ return 1;
+ }
+
/* Not first stmt of the group, check that the def-stmt/s match
the def-stmt/s of the first stmt. Allow different definition
types for reduction chains: the first stmt must be a
@@ -503,7 +511,6 @@ again:
|| oprnd_info->first_dt == vect_constant_def)
&& (dt == vect_external_def
|| dt == vect_constant_def)))
- || !types_compatible_p (oprnd_info->first_op_type, type)
|| (!STMT_VINFO_DATA_REF (stmt_info)
&& REDUC_GROUP_FIRST_ELEMENT (stmt_info)
&& ((!def_stmt_info