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: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Biener <richard dot guenther at gmail dot com>
- Date: Fri, 14 Mar 2014 14:01:41 +0100
- Subject: Re: [PATCH] BZ60501: Add addptr optab
- Authentication-results: sourceware.org; auth=none
- References: <20140313092413 dot GA14597 at bart> <CAFiYyc2Ack8h=rUDyX2wsGZFHxaK7T4LQGeFwwqSGMx_wq=ByA at mail dot gmail dot com> <53219885 dot 8020808 at linux dot vnet dot ibm dot com> <3263989 dot 6pOavBsA8X at polaris>
On 14/03/14 11:02, Eric Botcazou wrote:
>> This would suggest that you can use the pattern also for performing a normal
>> add in case the condition code is not needed afterwards but this isn't
>> correct for s390 31 bit where an address calculation is actually something
>> different.
>
> Then you should document that by stating that the pattern is guaranteed to be
> invoked only for addresses (and may not clobber the condition code).
Ok, will do.
>> addptr is better I think because it is a pattern which is
>> supposed to be implemented with a load address instruction and the
>> middle-end guarantees to use it only on addresses. (I hope LRA is actually
>> behaving that way).
>
> Hoping isn't sufficient IMO here, you need to rename/rework emit_add3_insn and
> possibly stop the compiler if the value it is invoked on is not an address.
Agreed. Any idea how to check for this?
Bye,
-Andreas-