http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46248
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot | |gnu.org, jakub at gcc dot | |gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-01 10:34:53 UTC --- if (added_sets_1) { rtx t = i1pat; if (i0_feeds_i1_n) t = subst (t, i0dest, i0src, 0, 0); XVECEXP (newpat, 0, --total_sets) = t; } if (added_sets_2) { rtx t = i2pat; if (i0_feeds_i2_n) t = subst (t, i0dest, i0src, 0, 0); if (i1_feeds_i2_n) t = subst (t, i1dest, i1src, 0, 0); if (i0_feeds_i1_n && i1_feeds_i2_n) <============== t = subst (t, i0dest, i0src, 0, 0); <============== XVECEXP (newpat, 0, --total_sets) = t; } The two lines above are problematic, because subst may clobber the first argument's expression and newpat = subst (newpat, i0dest, i0src, 0, i0_feeds_i1_n && i0dest_in_i0src); actually clobbered not just newpat, but also i1src which was in it. Not sure if we actually can rely it always happened say if substed_i0 is true and not do the i0dest -> i0src replacement in i2pat here.