diff options
author | Richard Biener <rguenther@suse.de> | 2021-01-05 14:38:15 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-01-05 16:43:39 +0100 |
commit | 26b5062be991cf709c7c628061a40a48e1bca681 (patch) | |
tree | 6da55739cc32bb9c051da37ebb5878c7cc7745ac | |
parent | 4ddee425b8c427d3cc13c49b26f442313e239572 (diff) | |
download | gcc-26b5062be991cf709c7c628061a40a48e1bca681.zip gcc-26b5062be991cf709c7c628061a40a48e1bca681.tar.gz gcc-26b5062be991cf709c7c628061a40a48e1bca681.tar.bz2 |
tree-optimization/98428 - avoid pre-existing vectors for loop SLP
It wasn't supposed to be enabled and appearantly copying around the
checking messed up the condition.
2021-01-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/98428
* tree-vect-slp.c (vect_build_slp_tree_1): Properly reject
vector lane extracts for loop vectorization.
-rw-r--r-- | gcc/tree-vect-slp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 2c2cf63..67aaa7b 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -1096,11 +1096,10 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap, && rhs_code == BIT_FIELD_REF) { tree vec = TREE_OPERAND (gimple_assign_rhs1 (stmt), 0); - if (TREE_CODE (vec) != SSA_NAME + if (!is_a <bb_vec_info> (vinfo) + || TREE_CODE (vec) != SSA_NAME || !types_compatible_p (vectype, TREE_TYPE (vec))) { - if (is_a <bb_vec_info> (vinfo) && i != 0) - continue; if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "Build SLP failed: " |