aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-10-18 10:31:19 +0200
committerRichard Biener <rguenther@suse.de>2021-10-18 12:57:43 +0200
commiteb032893675afea4b01cc6ad06a3e0dcfe9b51cd (patch)
tree1f0472932123b61a267eda11ecd9125fd0573497 /gcc/gcov.c
parent94dff03f67fad1f9c526bb915bb21a4deb19d638 (diff)
downloadgcc-eb032893675afea4b01cc6ad06a3e0dcfe9b51cd.zip
gcc-eb032893675afea4b01cc6ad06a3e0dcfe9b51cd.tar.gz
gcc-eb032893675afea4b01cc6ad06a3e0dcfe9b51cd.tar.bz2
tree-optimization/102788 - avoid spurious bool pattern fails
Bool pattern recog is required for correctness since vectorized compares otherwise produce -1 for true so any context where bool is used as value and not as condition or mask needs to be replaced with CMP ? 1 : 0. When we fail to find a vector type for the result of such use we may not simply elide such transform since a new bool result can emerge when for example the cast_forwprop pattern is applied. So the following avoids failing of the bool pattern recog process and instead not assign a vector type for the stmt. 2021-10-18 Richard Biener <rguenther@suse.de> PR tree-optimization/102788 * tree-vect-patterns.c (vect_init_pattern_stmt): Allow a NULL vectype. (vect_pattern_recog_1): Likewise. (vect_recog_bool_pattern): Continue matching the pattern even if we do not have a vector type for a conversion result. * g++.dg/vect/pr102788.cc: New testcase.
Diffstat (limited to 'gcc/gcov.c')
0 files changed, 0 insertions, 0 deletions