> You mean the patch at > http://gcc.gnu.org/ml/gcc-patches/2012-11/msg02275.html right? > > I haven't tried that other patch. I'll test that one.
Yes, thanks. > I suppose so. But this was all added before RTL fwprop and way before > GIMPLE optimizations. Avoiding the self-referential case is just more > difficult to do, quite expensive (have to scan the SET_SRC pattern), > and AFAICT doesn't bring much pay-off. > > I'll prepare something to avoid the self-referential case, but I think > we're making our lives complicated for no good reason. Can't you just use the same best-effort approach used for fwprop.c here? -- Eric Botcazou