diff mbox

[AArch64,4.9] Backport

Message ID 894B9D8AA7173E40BFFBBF195B8281BCB76A69@SZXEMI503-MBX.china.huawei.com
State New
Headers show

Commit Message

weixiangyu June 10, 2015, 10:06 a.m. UTC
Another backport patch which fixes a csmith ICE problem. Rebased on the latest 4.9 branch. 
Tested ok on aarch64-linux with qemu.

Comments

Marcus Shawcroft June 11, 2015, 8:41 a.m. UTC | #1
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
weixiangyu June 12, 2015, 10:15 a.m. UTC | #2
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
diff mbox

Patch

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.