This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR66444] Handle -fipa-ra in reload_combine
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: gcc-patches at gnu dot org
- Date: Mon, 8 Jun 2015 17:31:51 +0200
- Subject: Re: [PATCH, PR66444] Handle -fipa-ra in reload_combine
- Authentication-results: sourceware.org; auth=none
- References: <557584BC dot 2040603 at mentor dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Jun 08, 2015 at 02:04:12PM +0200, Tom de Vries wrote:
> this patch fixes PR66444, a problem with -fipa-ra in reload_combine.
>
> The problem is that for the test-case, reload_combine combines these two
> insns:
Please work out with Vlad whether reload_cse_move2add doesn't need similar
fix (and check other spots too).
> 2015-06-08 Tom de Vries <tom@codesourcery.com>
>
> PR rtl-optimization/66444
> * postreload.c (reload_combine): Use get_call_reg_set_usage instead of
> call_used_regs.
LGTM.
> * gcc.dg/pr66444.c: New test.
> +int __attribute__((noinline, noclone))
> +baz (void)
> +{
> + struct S *x = (struct S *) 0xe0000000U;
I'm still afraid this will not really work on s390-linux (which has only
31-bit pointers) and will not work on 16-bit int targets either
(some have say 24-bit pointers etc., not really familiar with the embedded
world).
So, I'd suggest use a macro for the address, so you don't need to duplicate
it, and define it to say ((struct S *) 0x8000UL), if it reproduces
even with that change without your reload_combine fix.
Ok for trunk and 5.2 with that change.
Jakub