This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] BZ60501: Add addptr optab
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>
- Cc: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, Richard Biener <richard dot guenther at gmail dot com>, Eric Botcazou <ebotcazou at adacore dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 18 Mar 2014 12:59:30 +0100
- Subject: Re: [PATCH] BZ60501: Add addptr optab
- Authentication-results: sourceware.org; auth=none
- References: <20140313092413 dot GA14597 at bart> <2693216 dot 5bvZFLAu17 at polaris> <CAFiYyc2Ack8h=rUDyX2wsGZFHxaK7T4LQGeFwwqSGMx_wq=ByA at mail dot gmail dot com> <53219885 dot 8020808 at linux dot vnet dot ibm dot com> <53274BDE dot 9070501 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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