[Bug tree-optimization/126771] sub-optimal bool pattern for comparison converted to integer

"rguenth at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126771

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Btw, I tried

diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc
index b921ae94848..0e00b093fb7 100644
--- a/gcc/tree-vect-patterns.cc
+++ b/gcc/tree-vect-patterns.cc
@@ -7310,7 +7310,7 @@ vect_determine_mask_precision (vec_info *vinfo,
stmt_vec_info stmt_info)
                                                (vinfo->vector_mode, op0_type))
              && (mask_type = truth_type_for (vectype))
              && expand_vec_cmp_expr_p (vectype, mask_type, code))
-           precision = GET_MODE_BITSIZE (mode);
+           precision = element_precision (mask_type);
        }
     }
   else

but that lead to "interesting" over-widening patterns being deduced and the
above code-path not taken either (but min_precision was 64).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.