[Bug tree-optimization/126789] Bogus bool vect_recog_mask_conversion_pattern with AVX512 style masks
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 11 11:42:16 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126789
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:1dec3355162851ab3cf991fbf8c7fa9cd08331f3
commit r17-3202-g1dec3355162851ab3cf991fbf8c7fa9cd08331f3
Author: Richard Biener <rguenther@suse.de>
Date: Tue Aug 11 12:55:19 2026 +0200
tree-optimization/126789 - pattern recog and precision of vector bools
When VECTOR_BOOLEAN_TYPE_P have integer mode then we need the original
scalar type that was used to derive it for determining the mask
precision of a statement. append_pattern_def_seq already has means
to get this, but the build_mask_conversion and
vect_convert_mask_for_vectype
lack that and thus suffer from bogus mask_precision values and in the
end failed vectorization.
PR tree-optimization/126789
* tree-vect-patterns.cc (build_mask_conversion): Add
scalar_type_for_mask parameter and pass it along.
(vect_convert_mask_for_vectype): Likewise.
(vect_recog_bool_pattern): Adjust.
(vect_recog_mask_conversion_pattern): Likewise.
* gcc.target/i386/vect-pr126789.c: New testcase.
More information about the Gcc-bugs
mailing list