http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52734
--- Comment #10 from vries at gcc dot gnu.org 2012-03-27 13:19:12 UTC --- Created attachment 27014 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27014 Tentative patch The key element of this patch is: ... + if (gvn_used && vuse1 != vuse2) + return; + ... If gvn was use to prove two bbs equal, and the incoming vuses are not equal, don't do the substitution. This is a bit too restrictive, I'm pondering about a more precise fix.