https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116860
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Obviously optimizations like that shouldn't be done in match.pd but in tree-ssa-reassoc.cc (optimize_range_tests) which has the infrastructure to do such optimization not just when the 2 conditions appear in BIT_IOR_EXPR, but also their negations in BIT_AND_EXPR and also when it appears in different basic blocks linked through GIMPLE_CONDs and combination thereof, or at least should be done in both places.