On Mon, Mar 17, 2014 at 03:24:14PM -0400, Vladimir Makarov wrote: > It is complicated. There is no guarantee that it is used only for > addresses. I need some time to think how to fix it. > > Meanwhile, you *should* commit the patch into the trunk because it > solves the real problem. And I can work from this to make changes > that the new pattern is only used for addresses. > > The patch is absolutely safe for all targets but s390. There is > still a tiny possibility that it might result in some problems for > s390 (now I see only one situation when a pseudo in a subreg > changed by equiv plus expr needs a reload). In any case your patch > solves real numerous failures and can be used as a base for further > work. > > Thanks for working on this problem, Andreas. Sorry that I missed > the PR60501.
BTW, does LRA require that CC isn't clobbered when it uses emit_add2_insn? I don't see how it can be guaranteed (except perhaps on i?86/x86_64 and maybe a few other targets). emit_add3_insn should be ok (even on s390*?) because recog_memoized should (I think) never add clobbers (it calls recog with 0 as last argument), but gen_add2_insn is a normall add<Pmode>3 insn that on many targets clobbers CC. Jakub