https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93131
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2020-01-02 Summary|((a&8) == 8) && ((a&2) == |((a&8) == 8) && ((a&2) == |2) is not optimized to |2) is not optimized to |(a&(8|2)) == * |(a&(8|2)) == (8|2) Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I have this for GCC 11. I noticed this while working on lowering bit-fields and seeing if we implement an optimization from fold-const.c to later on.