https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93131
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Indeed, reassoc could be taught to handle that and do it both in the inside of bb opt as well as when the & or | are actually && or || and split across multiple bbs.