public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, AArch64] [4.9] Backport
@ 2015-06-10 10:17 weixiangyu
  2015-06-11  9:07 ` Marcus Shawcroft
  0 siblings, 1 reply; 3+ messages in thread
From: weixiangyu @ 2015-06-10 10:17 UTC (permalink / raw)
  To: gcc-patches
  Cc: James Greenhalgh, marcus.shawcroft, richard.earnshaw, Yangfei (Felix)

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

Another backport patch which fixes a csmith ICE problem. Rebased on the latest 4.9 branch. 
Tested ok on aarch64-linux with qemu. 

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 223867)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,12 @@
+2015-06-10 Xiangyu Wei  <weixiangyu@huawei.com>
+
+	Backport from mainline r210497.
+	2014-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
+	Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
+
+	* config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Check RTX is
+	well formed.
+
 2015-05-28  Mike Frysinger  <vapier@gentoo.org>
 
 	* config/nios2/linux.h (CPP_SPEC): Define.
===================================================================
--- gcc/ChangeLog	(revision 223867)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,12 @@
+2015-06-10 Xiangyu Wei  <weixiangyu@huawei.com>
+
+	Backport from mainline r210497.
+	2014-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
+	Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
+
+	* config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Check RTX is
+	well formed.
+
 2015-05-28  Mike Frysinger  <vapier@gentoo.org>
 
 	* config/nios2/linux.h (CPP_SPEC): Define.

[-- Attachment #2: r210497.diff --]
[-- Type: application/octet-stream, Size: 1115 bytes --]

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 223867)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,12 @@
+2015-06-10 Xiangyu Wei  <weixiangyu@huawei.com>
+
+	Backport from mainline r210497.
+	2014-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
+	Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
+
+	* config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Check RTX is
+	well formed.
+
 2015-05-28  Mike Frysinger  <vapier@gentoo.org>
 
 	* config/nios2/linux.h (CPP_SPEC): Define.
===================================================================
--- gcc/ChangeLog	(revision 223867)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,12 @@
+2015-06-10 Xiangyu Wei  <weixiangyu@huawei.com>
+
+	Backport from mainline r210497.
+	2014-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
+	Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
+
+	* config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Check RTX is
+	well formed.
+
 2015-05-28  Mike Frysinger  <vapier@gentoo.org>
 
 	* config/nios2/linux.h (CPP_SPEC): Define.

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

* Re: [PATCH, AArch64] [4.9] Backport
  2015-06-10 10:17 [PATCH, AArch64] [4.9] Backport weixiangyu
@ 2015-06-11  9:07 ` Marcus Shawcroft
  2015-06-12 10:25   ` weixiangyu
  0 siblings, 1 reply; 3+ messages in thread
From: Marcus Shawcroft @ 2015-06-11  9:07 UTC (permalink / raw)
  To: weixiangyu
  Cc: gcc-patches, James Greenhalgh, marcus.shawcroft,
	richard.earnshaw, Yangfei (Felix)

On 10 June 2015 at 11:06, weixiangyu <weixiangyu@huawei.com> wrote:
> Another backport patch which fixes a csmith ICE problem. Rebased on the latest 4.9 branch.
> Tested ok on aarch64-linux with qemu.
>

Hi, The attached patch contains a ChangeLog diff but no code diff.
The patch r210497 on mainline is an adjustment to the cost model. If
this patch fixes an ICE than I suspect the underlying issue is not
resolved but instead changing the cost model slightly just hides the
issue.  Can you elaborate what is happening in the ICE you are trying
to fix?

Cheers
/Marcus

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

* RE: [PATCH, AArch64] [4.9] Backport
  2015-06-11  9:07 ` Marcus Shawcroft
@ 2015-06-12 10:25   ` weixiangyu
  0 siblings, 0 replies; 3+ messages in thread
From: weixiangyu @ 2015-06-12 10:25 UTC (permalink / raw)
  To: Marcus Shawcroft
  Cc: gcc-patches, James Greenhalgh, marcus.shawcroft,
	richard.earnshaw, Yangfei (Felix)

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

Sorry about that. The new patch contains code diff.
The ICE i want to fix: 
	(aarch64_strip_extend_or_extend): ...this, don't strip shifts, check RTX is well formed.

If the patch is not applied,the following compilation will cause a Seg fault:
../../install/bin/aarch64-linux-gnu-gcc -w -O2 /home/wxy/tmp/test.i 

EMI_29344640_0_rd.c: In function 'main':
EMI_29344640_0_rd.c:4005:1: internal compiler error: Segmentation fault
0x9aeb8f crash_signal
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/toplev.c:337
0xc7866e aarch64_is_extend_from_extract(machine_mode, rtx_def*, rtx_def*)
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/config/aarch64/aarch64.c:454
0xc78759 aarch64_strip_shift_or_extend
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/config/aarch64/aarch64.c:4474
0xc7e097 aarch64_rtx_costs
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/config/aarch64/aarch64.c:4614
0x95727f rtx_cost(rtx_def*, rtx_code, int, bool)
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/rtlanal.c:3879
0xc7dbe3 aarch64_rtx_costs
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/config/aarch64/aarch64.c:4693
0x95727f rtx_cost(rtx_def*, rtx_code, int, bool)
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/rtlanal.c:3879
0xc7dbe3 aarch64_rtx_costs
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/config/aarch64/aarch64.c:4693
0x95727f rtx_cost(rtx_def*, rtx_code, int, bool)
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/rtlanal.c:3879
0xc7dbe3 aarch64_rtx_costs
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/config/aarch64/aarch64.c:4693
0x95727f rtx_cost(rtx_def*, rtx_code, int, bool)
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/rtlanal.c:3879
0xd736fd set_src_cost
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/rtl.h:1370
0xd736fd distribute_and_simplify_rtx
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/combine.c:9308
0xd73899 simplify_logical
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/combine.c:6620
0xd7b837 combine_simplify_rtx
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/combine.c:5869
0xd7dc04 subst
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/combine.c:5176
0xd7da2f subst
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/combine.c:5121
0xd7fbf5 try_combine
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/combine.c:3144
0xd84c38 combine_instructions
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/combine.c:1392
0xd84ea2 rest_of_handle_combine
        /home/wxy/SDK_V1R5_trunk/SDK/build/script/cpu_hcc/p660/p660_build_dir/src/gcc-4.9/gcc/combine.c:13876
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

Cheers
/XIangyu Wei
-----Original Message-----
From: Marcus Shawcroft [mailto:marcus.shawcroft@gmail.com] 
Sent: Thursday, June 11, 2015 4:42 PM
To: weixiangyu
Cc: gcc-patches@gcc.gnu.org; James Greenhalgh; marcus.shawcroft@arm.com; richard.earnshaw@arm.com; Yangfei (Felix)
Subject: Re: [PATCH, AArch64] [4.9] Backport

On 10 June 2015 at 11:06, weixiangyu <weixiangyu@huawei.com> wrote:
> Another backport patch which fixes a csmith ICE problem. Rebased on the latest 4.9 branch.
> Tested ok on aarch64-linux with qemu.
>

Hi, The attached patch contains a ChangeLog diff but no code diff.
The patch r210497 on mainline is an adjustment to the cost model. If this patch fixes an ICE than I suspect the underlying issue is not resolved but instead changing the cost model slightly just hides the issue.  Can you elaborate what is happening in the ICE you are trying to fix?

Cheers
/Marcus

[-- Attachment #2: r210497_v2.diff --]
[-- Type: application/octet-stream, Size: 1224 bytes --]

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 223867)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,12 @@
+2015-06-10 Xiangyu Wei  <weixiangyu@huawei.com>
+
+	Backport from mainline r210497.
+	2014-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
+	Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
+
+	* config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Check RTX is
+	well formed.
+
 2015-05-28  Mike Frysinger  <vapier@gentoo.org>
 
 	* config/nios2/linux.h (CPP_SPEC): Define.
Index: gcc/config/aarch64/aarch64.c
===================================================================
--- gcc/config/aarch64/aarch64.c        (revision 223867)
+++ gcc/config/aarch64/aarch64.c        (working copy)
@@ -4473,6 +4473,7 @@ aarch64_strip_shift_or_extend (rtx x)
   /* Zero and sign extraction of a widened value.  */
   if ((GET_CODE (op) == ZERO_EXTRACT || GET_CODE (op) == SIGN_EXTRACT)
       && XEXP (op, 2) == const0_rtx
+      && GET_CODE (XEXP (op, 0)) == MULT
       && aarch64_is_extend_from_extract (GET_MODE (op), XEXP (XEXP (op, 0), 1),
                                         XEXP (op, 1)))
     return XEXP (XEXP (op, 0), 0);

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

end of thread, other threads:[~2015-06-12 10:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 10:17 [PATCH, AArch64] [4.9] Backport weixiangyu
2015-06-11  9:07 ` Marcus Shawcroft
2015-06-12 10:25   ` weixiangyu

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).