public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant
@ 2013-09-30 13:38 Renlin Li
  2013-10-01  9:11 ` Kyrill Tkachov
  2013-10-01 11:32 ` Marcus Shawcroft
  0 siblings, 2 replies; 9+ messages in thread
From: Renlin Li @ 2013-09-30 13:38 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

Hello all,

Sorry for my last patch that cause some test regressions. I have correct 
it, and it has been tested for aarch64-none-elf on the model.

This patch will replace all explicit calls to gen_rtx_PLUS and GEN_INT 
with plus_constant.

OK for trunk?

Kind regards,
Renlin Li

gcc/ChangeLog:

2013-09-30  Renlin Li <renlin.li@arm.com>

     * config/aarch64/aarch64.c (aarch64_expand_prologue): Use 
plus_constant.
     (aarch64_expand_epilogue): Likewise.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: aarch64.diff --]
[-- Type: text/x-patch; name=aarch64.diff, Size: 1945 bytes --]

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index e8ae20a..db56f19 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -2065,9 +2065,9 @@ aarch64_expand_prologue (void)
 	  emit_insn (gen_add2_insn (stack_pointer_rtx, op0));
 	  aarch64_set_frame_expr (gen_rtx_SET
 				  (Pmode, stack_pointer_rtx,
-				   gen_rtx_PLUS (Pmode,
-						 stack_pointer_rtx,
-						 GEN_INT (-frame_size))));
+				   plus_constant (Pmode,
+						  stack_pointer_rtx,
+						  -frame_size)));
 	}
       else if (frame_size > 0)
 	{
@@ -2151,9 +2151,9 @@ aarch64_expand_prologue (void)
 					   GEN_INT (fp_offset)));
 	  aarch64_set_frame_expr (gen_rtx_SET
 				  (Pmode, hard_frame_pointer_rtx,
-				   gen_rtx_PLUS (Pmode,
-						 stack_pointer_rtx,
-						 GEN_INT (fp_offset))));
+				   plus_constant (Pmode,
+						  stack_pointer_rtx,
+						  fp_offset)));
 	  RTX_FRAME_RELATED_P (insn) = 1;
 	  insn = emit_insn (gen_stack_tie (stack_pointer_rtx,
 					   hard_frame_pointer_rtx));
@@ -2349,9 +2349,9 @@ aarch64_expand_epilogue (bool for_sibcall)
 	  emit_insn (gen_add2_insn (stack_pointer_rtx, op0));
 	  aarch64_set_frame_expr (gen_rtx_SET
 				  (Pmode, stack_pointer_rtx,
-				   gen_rtx_PLUS (Pmode,
-						 stack_pointer_rtx,
-						 GEN_INT (frame_size))));
+				   plus_constant (Pmode,
+						  stack_pointer_rtx,
+						  frame_size)));
 	}
       else if (frame_size > 0)
 	{
@@ -2373,10 +2373,10 @@ aarch64_expand_epilogue (bool for_sibcall)
 	    }
 	}
 
-      aarch64_set_frame_expr (gen_rtx_SET (Pmode, stack_pointer_rtx,
-					   gen_rtx_PLUS (Pmode,
-							 stack_pointer_rtx,
-							 GEN_INT (offset))));
+        aarch64_set_frame_expr (gen_rtx_SET (Pmode, stack_pointer_rtx,
+					     plus_constant (Pmode,
+							    stack_pointer_rtx,
+							    offset)));
     }
 
   emit_use (gen_rtx_REG (DImode, LR_REGNUM));

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant
  2013-09-30 13:38 [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant Renlin Li
@ 2013-10-01  9:11 ` Kyrill Tkachov
  2013-10-01 11:32 ` Marcus Shawcroft
  1 sibling, 0 replies; 9+ messages in thread
From: Kyrill Tkachov @ 2013-10-01  9:11 UTC (permalink / raw)
  To: Renlin Li; +Cc: gcc-patches, Marcus Shawcroft, Richard Earnshaw

On 30/09/13 14:20, Renlin Li wrote:
> Hello all,
>
> Sorry for my last patch that cause some test regressions. I have correct
> it, and it has been tested for aarch64-none-elf on the model.
>
> This patch will replace all explicit calls to gen_rtx_PLUS and GEN_INT
> with plus_constant.
>
> OK for trunk?
>
> Kind regards,
> Renlin Li
>
> gcc/ChangeLog:
>
> 2013-09-30  Renlin Li <renlin.li@arm.com>
>
>       * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
> plus_constant.
>       (aarch64_expand_epilogue): Likewise.
Looks ok to me, but I can't approve it. CC'ing the maintainers...

Kyrill

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant
  2013-09-30 13:38 [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant Renlin Li
  2013-10-01  9:11 ` Kyrill Tkachov
@ 2013-10-01 11:32 ` Marcus Shawcroft
  2013-10-02 10:31   ` Kyrill Tkachov
  1 sibling, 1 reply; 9+ messages in thread
From: Marcus Shawcroft @ 2013-10-01 11:32 UTC (permalink / raw)
  To: Renlin Li; +Cc: gcc-patches

On 30 September 2013 14:20, Renlin Li <renlin.li@arm.com> wrote:

> gcc/ChangeLog:
>
> 2013-09-30  Renlin Li <renlin.li@arm.com>
>
>     * config/aarch64/aarch64.c (aarch64_expand_prologue): Use plus_constant.
>     (aarch64_expand_epilogue): Likewise.

OK
/Marcus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant
  2013-10-01 11:32 ` Marcus Shawcroft
@ 2013-10-02 10:31   ` Kyrill Tkachov
  0 siblings, 0 replies; 9+ messages in thread
From: Kyrill Tkachov @ 2013-10-02 10:31 UTC (permalink / raw)
  To: Marcus Shawcroft; +Cc: Renlin Li, gcc-patches

On 01/10/13 12:32, Marcus Shawcroft wrote:
> On 30 September 2013 14:20, Renlin Li <renlin.li@arm.com> wrote:
>
>> gcc/ChangeLog:
>>
>> 2013-09-30  Renlin Li <renlin.li@arm.com>
>>
>>      * config/aarch64/aarch64.c (aarch64_expand_prologue): Use plus_constant.
>>      (aarch64_expand_epilogue): Likewise.
> OK
> /Marcus

I've committed the patch as r203108.
Renlin, for future reference: Changelog rules expect two spaces between your 
name and the email. So I've committed the patch with the Changelog:

2013-10-02  Renlin Li  <renlin.li@arm.com>

     * config/aarch64/aarch64.c (aarch64_expand_prologue): Use plus_constant.
     (aarch64_expand_epilogue): Likewise.


Cheers,
Kyrill

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant
  2013-09-21 13:44     ` James Greenhalgh
@ 2013-09-23  9:53       ` James Greenhalgh
  0 siblings, 0 replies; 9+ messages in thread
From: James Greenhalgh @ 2013-09-23  9:53 UTC (permalink / raw)
  To: Renlin Li; +Cc: Marcus Shawcroft, gcc-patches

On Sat, Sep 21, 2013 at 09:34:34AM +0100, James Greenhalgh wrote:
> On Fri, Sep 20, 2013 at 03:40:59PM +0100, Renlin Li wrote:
> > Thank you, can you please commit it for me?
> > 
> > Kind regards,
> > Renlin Li
> > 
> > On 09/20/13 15:26, Marcus Shawcroft wrote:
> > > On 20 September 2013 15:18, Renlin Li <renli.li@arm.com> wrote:
> > >
> > >> 2013-09-20  Renlin Li  <renlin.li@arm.com>
> > >>
> > >>      * config/aarch64/aarch64.c (aarch64_expand_prologue): Use plus_constant.
> > >>      (aarch64_expand_epilogue): Likewise.
> > >>      (aarch64_legitimize_reload_address): Likewise.
>  
> Hi Renlin,
> 
> This patch appears to have caused a number of regressions on
> an aarch64-none-elf test run.

Marcus, Renlin,

I'm also seeing issues building an AArch64 Linux toolchain with this patch
applied, so I've reverted it for now.

Thanks,
James

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant
  2013-09-20 15:33   ` Renlin Li
@ 2013-09-21 13:44     ` James Greenhalgh
  2013-09-23  9:53       ` James Greenhalgh
  0 siblings, 1 reply; 9+ messages in thread
From: James Greenhalgh @ 2013-09-21 13:44 UTC (permalink / raw)
  To: Renlin Li; +Cc: Marcus Shawcroft, gcc-patches

On Fri, Sep 20, 2013 at 03:40:59PM +0100, Renlin Li wrote:
> Thank you, can you please commit it for me?
> 
> Kind regards,
> Renlin Li
> 
> On 09/20/13 15:26, Marcus Shawcroft wrote:
> > On 20 September 2013 15:18, Renlin Li <renli.li@arm.com> wrote:
> >
> >> 2013-09-20  Renlin Li  <renlin.li@arm.com>
> >>
> >>      * config/aarch64/aarch64.c (aarch64_expand_prologue): Use plus_constant.
> >>      (aarch64_expand_epilogue): Likewise.
> >>      (aarch64_legitimize_reload_address): Likewise.
 
Hi Renlin,

This patch appears to have caused a number of regressions on
an aarch64-none-elf test run.

I see Internal Compiler Errors along these lines:

../src/gcc/gcc/testsuite/gcc.dg/vect/slp-multitypes-2.c: In function 'main1':
../src/gcc/gcc/testsuite/gcc.dg/vect/slp-multitypes-2.c:68:1: error: insn does not satisfy its constraints:
 }
 ^
(insn 182 472 183 (set (reg:QI 2 x2 [277])
        (mem/c:QI (plus:DI (reg:DI 3 x3)
                (const_int 6264 [0x1878])) [0 b1+0 S1 A64])) ../src/gcc/gcc/testsuite/gcc.dg/vect/slp-multitypes-2.c:39 30 {*movqi_aarch64}
     (nil))
../src/gcc/gcc/testsuite/gcc.dg/vect/slp-multitypes-2.c:68:1: internal compiler error: in final_scan_insn, at final.c:2886
0x8b8135 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
        /work/gcc-clean/src/gcc/gcc/rtl-error.c:109
0x8b815f _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /work/gcc-clean/src/gcc/gcc/rtl-error.c:120
0x6e1822 final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
        /work/gcc-clean/src/gcc/gcc/final.c:2886
0x6e1b01 final(rtx_def*, _IO_FILE*, int)
        /work/gcc-clean/src/gcc/gcc/final.c:2017
0x6e1d49 rest_of_handle_final
        /work/gcc-clean/src/gcc/gcc/final.c:4422
0x6e1d49 execute
        /work/gcc-clean/src/gcc/gcc/final.c:4497
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Thanks,
James

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant
  2013-09-20 14:41 ` Marcus Shawcroft
@ 2013-09-20 15:33   ` Renlin Li
  2013-09-21 13:44     ` James Greenhalgh
  0 siblings, 1 reply; 9+ messages in thread
From: Renlin Li @ 2013-09-20 15:33 UTC (permalink / raw)
  To: Marcus Shawcroft; +Cc: gcc-patches

Thank you, can you please commit it for me?

Kind regards,
Renlin Li

On 09/20/13 15:26, Marcus Shawcroft wrote:
> On 20 September 2013 15:18, Renlin Li <renli.li@arm.com> wrote:
>
>> 2013-09-20  Renlin Li  <renlin.li@arm.com>
>>
>>      * config/aarch64/aarch64.c (aarch64_expand_prologue): Use plus_constant.
>>      (aarch64_expand_epilogue): Likewise.
>>      (aarch64_legitimize_reload_address): Likewise.
> OK
> /Marcus
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant
  2013-09-20 14:33 Renlin Li
@ 2013-09-20 14:41 ` Marcus Shawcroft
  2013-09-20 15:33   ` Renlin Li
  0 siblings, 1 reply; 9+ messages in thread
From: Marcus Shawcroft @ 2013-09-20 14:41 UTC (permalink / raw)
  To: Renlin Li; +Cc: gcc-patches

On 20 September 2013 15:18, Renlin Li <renli.li@arm.com> wrote:

> 2013-09-20  Renlin Li  <renlin.li@arm.com>
>
>     * config/aarch64/aarch64.c (aarch64_expand_prologue): Use plus_constant.
>     (aarch64_expand_epilogue): Likewise.
>     (aarch64_legitimize_reload_address): Likewise.

OK
/Marcus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant
@ 2013-09-20 14:33 Renlin Li
  2013-09-20 14:41 ` Marcus Shawcroft
  0 siblings, 1 reply; 9+ messages in thread
From: Renlin Li @ 2013-09-20 14:33 UTC (permalink / raw)
  To: gcc-patches; +Cc: Marcus Shawcroft, Richard Earnshaw

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

Hello all,

This patch will replace all explicit calls to gen_rtx_PLUS and GEN_INT 
with plus_constant.

This has been tested for aarch64-none-elf on the model.
OK for trunk?

Kind regards,
Renlin Li

gcc/ChangeLog:

2013-09-20  Renlin Li  <renlin.li@arm.com>

     * config/aarch64/aarch64.c (aarch64_expand_prologue): Use 
plus_constant.
     (aarch64_expand_epilogue): Likewise.
     (aarch64_legitimize_reload_address): Likewise.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: aarch64.diff --]
[-- Type: text/x-patch; name=aarch64.diff, Size: 2416 bytes --]

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index e8ae20a..c65d845 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -2065,9 +2065,9 @@ aarch64_expand_prologue (void)
 	  emit_insn (gen_add2_insn (stack_pointer_rtx, op0));
 	  aarch64_set_frame_expr (gen_rtx_SET
 				  (Pmode, stack_pointer_rtx,
-				   gen_rtx_PLUS (Pmode,
-						 stack_pointer_rtx,
-						 GEN_INT (-frame_size))));
+				   plus_constant (Pmode,
+						  stack_pointer_rtx,
+						  -frame_size)));
 	}
       else if (frame_size > 0)
 	{
@@ -2151,9 +2151,9 @@ aarch64_expand_prologue (void)
 					   GEN_INT (fp_offset)));
 	  aarch64_set_frame_expr (gen_rtx_SET
 				  (Pmode, hard_frame_pointer_rtx,
-				   gen_rtx_PLUS (Pmode,
-						 stack_pointer_rtx,
-						 GEN_INT (fp_offset))));
+				   plus_constant (Pmode,
+						  stack_pointer_rtx,
+						  fp_offset)));
 	  RTX_FRAME_RELATED_P (insn) = 1;
 	  insn = emit_insn (gen_stack_tie (stack_pointer_rtx,
 					   hard_frame_pointer_rtx));
@@ -2349,9 +2349,9 @@ aarch64_expand_epilogue (bool for_sibcall)
 	  emit_insn (gen_add2_insn (stack_pointer_rtx, op0));
 	  aarch64_set_frame_expr (gen_rtx_SET
 				  (Pmode, stack_pointer_rtx,
-				   gen_rtx_PLUS (Pmode,
-						 stack_pointer_rtx,
-						 GEN_INT (frame_size))));
+				   plus_constant (Pmode,
+						  stack_pointer_rtx,
+						  frame_size)));
 	}
       else if (frame_size > 0)
 	{
@@ -2373,10 +2373,10 @@ aarch64_expand_epilogue (bool for_sibcall)
 	    }
 	}
 
-      aarch64_set_frame_expr (gen_rtx_SET (Pmode, stack_pointer_rtx,
-					   gen_rtx_PLUS (Pmode,
-							 stack_pointer_rtx,
-							 GEN_INT (offset))));
+        aarch64_set_frame_expr (gen_rtx_SET (Pmode, stack_pointer_rtx,
+					     plus_constant (Pmode,
+							    stack_pointer_rtx,
+							    offset)));
     }
 
   emit_use (gen_rtx_REG (DImode, LR_REGNUM));
@@ -4014,9 +4014,9 @@ aarch64_legitimize_reload_address (rtx *x_p,
 
       /* Reload high part into base reg, leaving the low part
 	 in the mem instruction.  */
-      x = gen_rtx_PLUS (xmode,
-			gen_rtx_PLUS (xmode, XEXP (x, 0), cst),
-			GEN_INT (low));
+      x = plus_constant (xmode,
+			 gen_rtx_PLUS (xmode, XEXP (x, 0), cst),
+			 low);
 
       push_reload (XEXP (x, 0), NULL_RTX, &XEXP (x, 0), NULL,
 		   BASE_REG_CLASS, xmode, VOIDmode, 0, 0,

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-02 10:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-30 13:38 [PATCH][AARCH64]Replace gen_rtx_PLUS with plus_constant Renlin Li
2013-10-01  9:11 ` Kyrill Tkachov
2013-10-01 11:32 ` Marcus Shawcroft
2013-10-02 10:31   ` Kyrill Tkachov
  -- strict thread matches above, loose matches on Subject: below --
2013-09-20 14:33 Renlin Li
2013-09-20 14:41 ` Marcus Shawcroft
2013-09-20 15:33   ` Renlin Li
2013-09-21 13:44     ` James Greenhalgh
2013-09-23  9:53       ` James Greenhalgh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).