This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, PR66444] Handle -fipa-ra in reload_combine


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]