diff options
author | Richard Biener <rguenther@suse.de> | 2022-01-04 15:49:50 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-01-04 16:51:53 +0100 |
commit | 88e861655b3e59bc982ba22cd6e2e7348efae866 (patch) | |
tree | 3ab2468ca51be098bd4a4791facfb02ccf68f725 /gcc/tree-vect-loop.c | |
parent | 790854ea7670f11c14d431c102a49181d2915965 (diff) | |
download | gcc-88e861655b3e59bc982ba22cd6e2e7348efae866.zip gcc-88e861655b3e59bc982ba22cd6e2e7348efae866.tar.gz gcc-88e861655b3e59bc982ba22cd6e2e7348efae866.tar.bz2 |
tree-optimization/103800 - sanity check more PHI vectorization
Bool pattern detection doesn't really handle PHIs well so we have
to be prepared for mismatched vector types in more cases than
originally thought.
2022-01-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/103800
* tree-vect-loop.c (vectorizable_phi): Remove assert and
expand comment.
* gcc.dg/vect/bb-slp-pr103800.c: New testcase.
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index ebd7d9c..77f1cc0 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -7850,17 +7850,15 @@ vectorizable_phi (vec_info *, && !useless_type_conversion_p (vectype, SLP_TREE_VECTYPE (child))) { - /* With bools we can have mask and non-mask precision vectors, - while pattern recog is supposed to guarantee consistency here - bugs in it can cause mismatches (PR103489 for example). + /* With bools we can have mask and non-mask precision vectors + or different non-mask precisions. while pattern recog is + supposed to guarantee consistency here bugs in it can cause + mismatches (PR103489 and PR103800 for example). Deal with them here instead of ICEing later. */ if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "incompatible vector type setup from " "bool pattern detection\n"); - gcc_checking_assert - (VECTOR_BOOLEAN_TYPE_P (SLP_TREE_VECTYPE (child)) - != VECTOR_BOOLEAN_TYPE_P (vectype)); return false; } |