http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35306
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-04 00:11:40 UTC --- I have a patch which handles: int bla(int a, int x, int y) { return (a & x)!=0 | (a & y)!=0; } But it does not handle the original case though. That is mostly because we don't get a BIT_IOR_EXPR in the instruction stream.