https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106414
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Hmm, OK. With integer valued comparisons considered truth_valued_p a ~ on them does not result in a truth_value_p. That in the end means that we'd need to sign-extend the result or restrict the pattern more. I'm testing a patch.