From: Richard Biener Date: Wed, 14 Oct 2020 13:04:24 +0000 (+0200) Subject: More vect_get_and_check_slp_defs refactoring X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea9535e75e9118493879cb76520c85272981ebda;p=gcc.git 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 * tree-vect-slp.c (vect_get_and_check_slp_defs): Split out test for compatible operand types. --- diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index ba681fe6d5e..5e0a3608948 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