https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112406
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Robin Dapp <rd...@gcc.gnu.org>: https://gcc.gnu.org/g:f25a5b199a0ebd4695466e665e49041339f0c6a7 commit r14-5614-gf25a5b199a0ebd4695466e665e49041339f0c6a7 Author: Robin Dapp <rd...@ventanamicro.com> Date: Fri Nov 17 10:34:35 2023 +0100 vect: Add bool pattern handling for COND_OPs. In order to handle masks properly for conditional operations this patch teaches vect_recog_mask_conversion_pattern to also handle conditional operations. Now we convert e.g. _mask = *_6; _ifc123 = COND_OP (_mask, ...); into _mask = *_6; patt200 = (<signed-boolean:1>) _mask; patt201 = COND_OP (patt200, ...); This way the mask will be properly recognized as boolean mask and the correct vector mask will be generated. gcc/ChangeLog: PR middle-end/112406 * tree-vect-patterns.cc (vect_recog_mask_conversion_pattern): Convert masks for conditional operations as well. gcc/testsuite/ChangeLog: * gfortran.dg/pr112406.f90: New test.