http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52060
--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-07 08:46:39 UTC --- > I think the important question is if it is ok that combine_simplify_rtx may > modify the given rtl in place, as opposed to keeping it unmodified and just > allocating new rtx and returning it. A brief look at combine.c suggests that > SUBST () is used in so many places that it is meant to be ok to modify it in > place. > > Then we for added_sets_{1,2} should just make copies of i1src resp. i0src > upfront, which means perhaps slightly bigger amount of GC, but at least it > won't miscompile things. I'm a little uncomfortable with the patch, because I think it's annoying to have to copy a pattern that you're going to substitute for. On the other hand, given that combine_simplify_rtx is allowed to SUBST, that's the most reasonable fix. Why do you need 2 copies of I0SRC though?