------- Comment #4 from jakub at gcc dot gnu dot org 2010-07-08 14:44 ------- Created an attachment (id=21147) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21147&action=view) gcc46-vrp.patch
So, combiner seems to be the first to notice that c must be actually zero (2 & (x > y)). This patch just tries to notice it earlier, during VRP, which of course isn't a fix for this bug (which is somewhere in the combiner where it doesn't notice that when it moves the and insn it clobbers cc which is needed), just makes it latent for -O2 (still present at -O1 or -O2 -fno-tree-vrp). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44858