http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52060

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-07 
09:21:34 UTC ---
(In reply to comment #7)
> 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.

Yeah, I'm also not very happy about it, but we do other copy_rtx calls (e.g.
for i0pat/i1pat/i2pat), for the same reason.

> Why do you need 2 copies of I0SRC though?

Because it might be substed twice, once into i1pat (which might clobber it with
random changes) and then again into i2pat, if both i1dest and i2dest are needed
after the pattern.  With the two separate variables we copy_rtx it only when we
are actually going to use them in subst.  Other alternative would be to create
just one copy (i0src_copy) upfront
if ((added_sets_1 && i0_feeds_i1_n)
    || (added_sets_2 && ((i0_feeds_i1_n && i1_feeds_i2_n) || (i0_feeds_i2_n))))
and then right before we subst it into i1pat check the second half of the
condition again and if it is true, copy it again, but that would be IMHO uglier
than this.

Reply via email to