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.shawcr...@gmail.com] Sent: Thursday, June 11, 2015 4:42 PM To: weixiangyu Cc: gcc-patches@gcc.gnu.org; James Greenhalgh; marcus.shawcr...@arm.com; richard.earns...@arm.com; Yangfei (Felix) Subject: Re: [PATCH, AArch64] [4.9] Backport On 10 June 2015 at 11:06, weixiangyu <weixian...@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
r210497_v2.diff
Description: r210497_v2.diff