https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110252
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- You can probably follow what maybe_fold_comparisons_from_match_pd does, possibly exactly the same thing (or even use a similar helper extended to maybe_fold_cond_expr_from_match_pd?!)