[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 --- Comment #13 from Marc Glisse glisse at gcc dot gnu.org --- Author: glisse Date: Mon Nov 3 10:36:35 2014 New Revision: 217033 URL: https://gcc.gnu.org/viewcvs?rev=217033root=gccview=rev Log: 2014-11-03 Marc Glisse marc.gli...@inria.fr PR tree-optimization/63666 * fold-const.c: Include optabs.h. (fold_ternary_loc) VEC_PERM_EXPR: Avoid canonicalizing a can_vec_perm_p permutation to one that is not. Modified: trunk/gcc/ChangeLog trunk/gcc/fold-const.c
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Richard Biener rguenth at gcc dot gnu.org --- Fixed.
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 --- Comment #7 from Richard Biener rguenth at gcc dot gnu.org --- Author: rguenth Date: Wed Oct 29 09:22:55 2014 New Revision: 216825 URL: https://gcc.gnu.org/viewcvs?rev=216825root=gccview=rev Log: 2014-10-29 Richard Biener rguent...@suse.de PR tree-optimization/63666 * tree-vect-slp.c (vect_get_mask_element): Properly handle accessing out-of-bound elements. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-vect-slp.c
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 --- Comment #8 from Jiong Wang jiwang at gcc dot gnu.org --- Created attachment 33839 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33839action=edit vshuf-v16hi.i Richard, after your fix, the issue still exist on arm-none-eabi. testcase attached. cc1 built by (../gcc/configure --target=arm-none-eabi --enable-languages=c,c++) ./cc1 -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=neon vshuf-v16hi.i -Os Breakpoint 1, fancy_abort (file=0x1492484 ../../gcc/gcc/gcse.c, line=2153, function=0x1492df0 process_insert_insn) at ../../gcc/gcc/diagnostic.c:1232 1232 internal_error (in %s, at %s:%d, function, trim_filename (file), line); (gdb) bt #0 fancy_abort (file=0x1492484 ../../gcc/gcc/gcse.c, line=2153, function=0x1492df0 process_insert_insn) at ../../gcc/gcc/diagnostic.c:1232 #1 0x0096b680 in process_insert_insn (expr=0x1db2800) at ../../gcc/gcc/gcse.c:2153 #2 0x0096b6da in insert_insn_end_basic_block (expr=0x1db2800, bb=0x76e13dd0) at ../../gcc/gcc/gcse.c:2175 #3 0x0096e03f in hoist_code () at ../../gcc/gcc/gcse.c:3471 #4 0x0096ea94 in one_code_hoisting_pass () at ../../gcc/gcc/gcse.c:3701 #5 0x0096f999 in execute_rtl_hoist () at ../../gcc/gcc/gcse.c:4191 #6 0x0096fae9 in (anonymous namespace)::pass_rtl_hoist::execute (this=0x1cecca0) at ../../gcc/gcc/gcse.c:4272 #7 0x00b4f445 in execute_one_pass (pass=0x1cecca0) at ../../gcc/gcc/passes.c:2156 #8 0x00b4f684 in execute_pass_list_1 (pass=0x1cecca0) at ../../gcc/gcc/passes.c:2208 #9 0x00b4f6b5 in execute_pass_list_1 (pass=0x1cec8e0) at ../../gcc/gcc/passes.c:2209 #10 0x00b4f6f7 in execute_pass_list (fn=0x76bca1f8, pass=0x1ce97c0) at ../../gcc/gcc/passes.c:2219 #11 0x007d9aa8 in cgraph_node::expand (this=0x76bcd000) at ../../gcc/gcc/cgraphunit.c:1742 #12 0x007da0c7 in expand_all_functions () at ../../gcc/gcc/cgraphunit.c:1878 #13 0x007dac0d in symbol_table::compile (this=0x76c74000) at ../../gcc/gcc/cgraphunit.c:2213 #14 0x007dadc4 in symbol_table::finalize_compilation_unit (this=0x76c74000) at ../../gcc/gcc/cgraphunit.c:2290 #15 0x0063572d in c_write_global_declarations () at ../../gcc/gcc/c/c-decl.c:10641 #16 0x00c489fc in compile_file () at ../../gcc/gcc/toplev.c:574 #17 0x00c4ad22 in do_compile () at ../../gcc/gcc/toplev.c:1981 #18 0x00c4af2c in toplev::main (this=0x7fffe55f, argc=6, argv=0x7fffe658) at ../../gcc/gcc/toplev.c:2078 #19 0x013a02b2 in main (argc=6, argv=0x7fffe658) at ../../gcc/gcc/main.c:38
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 --- Comment #9 from rguenther at suse dot de rguenther at suse dot de --- On Wed, 29 Oct 2014, jiwang at gcc dot gnu.org wrote: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 --- Comment #8 from Jiong Wang jiwang at gcc dot gnu.org --- Created attachment 33839 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33839action=edit vshuf-v16hi.i Richard, after your fix, the issue still exist on arm-none-eabi. testcase attached. This looks like a completely different issue than the one reported in the initial description. Please open a separate bugreport.
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added CC||glisse at gcc dot gnu.org --- Comment #10 from Richard Biener rguenth at gcc dot gnu.org --- (In reply to Andreas Schwab from comment #2) Also breaks gcc.dg/vect/vect-strided-a-u8-i2-gap.c $ gcc/xgcc -Bgcc/ ../gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c -ftree-vectorize -fno-vect-cost-model -fno-common -O2 -fdump-tree-vect-details -lm -o ./vect-strided-a-u8-i2-gap.exe ../gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c: In function ‘main1’: ../gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c:34:16: internal compiler error: in expand_expr_real_2, at expr.c:9156 res[i].b = ptr-a; ^ 0x4059052f expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ../../gcc/expr.c:9156 0x40579c1f expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:9463 0x4058b71f store_expr(tree_node*, rtx_def*, int, bool) ../../gcc/expr.c:5344 0x4059701f expand_assignment(tree_node*, tree_node*, bool) ../../gcc/expr.c:5130 0x40381b7f expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3285 0x40381b7f expand_gimple_stmt ../../gcc/cfgexpand.c:3381 0x4038d89f expand_gimple_basic_block ../../gcc/cfgexpand.c:5216 0x403916ef execute ../../gcc/cfgexpand.c:5822 This also still happens. The vectorizer generates (and verified) vect_perm_even_77 = VEC_PERM_EXPR vect__22.9_74, vect__22.10_76, { 0, 2, 4, 6, 8, 10, 12, 14 }; vect_perm_odd_78 = VEC_PERM_EXPR vect__22.9_74, vect__22.10_76, { 1, 3, 5, 7, 9, 11, 13, 15 }; vect_inter_high_82 = VEC_PERM_EXPR vect_perm_even_77, vect_perm_even_77, { 0, 8, 1, 9, 2, 10, 3, 11 }; vect_inter_low_83 = VEC_PERM_EXPR vect_perm_even_77, vect_perm_even_77, { 4, 12, 5, 13, 6, 14, 7, 15 }; then we unroll the loop and forwprop4 comes along changing vect_perm_even_145 = VEC_PERM_EXPR vect__22.9_142, vect__22.10_144, { 0, 2, 4, 6, 8, 10, 12, 14 }; vect_inter_high_146 = VEC_PERM_EXPR vect_perm_even_145, vect_perm_even_145, { 0, 8, 1, 9, 2, 10, 3, 11 }; to vect_perm_even_145 = VEC_PERM_EXPR vect__22.9_142, vect__22.10_144, { 0, 2, 4, 6, 8, 10, 12, 14 }; vect_inter_high_146 = VEC_PERM_EXPR vect_perm_even_145, vect_perm_even_145, { 0, 0, 1, 1, 2, 2, 3, 3 }; which isn't a supported permutation. It looks like fold-const.c:fold_ternary_loc doesn't care about only generating supported permutations and the fallback code in expand_vec_perm doesn't cover all cases.
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 --- Comment #11 from Richard Biener rguenth at gcc dot gnu.org --- Index: gcc/fold-const.c === --- gcc/fold-const.c(revision 216834) +++ gcc/fold-const.c(working copy) @@ -82,6 +82,7 @@ along with GCC; see the file COPYING3. #include ipa-ref.h #include cgraph.h #include generic-match.h +#include optabs.h /* Nonzero if we are folding constants inside an initializer; zero otherwise. */ @@ -14311,7 +14331,8 @@ fold_ternary_loc (location_t loc, enum t if (op0 == op1 !single_arg) changed = true; - if (need_mask_canon arg2 == op2) + if (need_mask_canon arg2 == op2 + can_vec_perm_p (TYPE_MODE (type), false, sel)) { tree *tsel = XALLOCAVEC (tree, nelts); tree eltype = TREE_TYPE (TREE_TYPE (arg2)); fixes the IA64 case.
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 --- Comment #12 from Marc Glisse glisse at gcc dot gnu.org --- (I am traveling this week, so I can only post a short comment) (In reply to Richard Biener from comment #11) - if (need_mask_canon arg2 == op2) + if (need_mask_canon arg2 == op2 + can_vec_perm_p (TYPE_MODE (type), false, sel)) seems reasonable, though if we didn't have can_vec_perm_p before the transformation (which implies we are before vector lowering) we should probably still transform. Also, I believe that targets should try to support single argument permutations when they support a 2 argument version that degenerates to it when both arguments are the same. By the way, from a quick look, I don't see where we protect against TREE_SIDE_EFFECTS(op0) when doing op0=op1 or op1=op0 in this code, I don't remember if there is a reason why it isn't needed.
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 Jiong Wang jiwang at gcc dot gnu.org changed: What|Removed |Added CC||jiwang at gcc dot gnu.org --- Comment #1 from Jiong Wang jiwang at gcc dot gnu.org --- I noticed this on aarch64 platform also and I suspect it's caused by commit f619ecaed41d1487091098a0f4fdf4d6ed1fa379 Author: rguenth rguenth@138bc75d-0d04-0410-961f-82ee72b054a4 Date: Mon Oct 27 11:30:23 2014 + 2014-10-27 Richard Biener rguent...@suse.de * tree-ssa-forwprop.c: Include tree-cfgcleanup.h and tree-into-ssa.h. (lattice): New global. (fwprop_ssa_val): New function. (fold_all_stmts): Likewise. (pass_forwprop::execute): Finally fold all stmts. * gcc.dg/tree-ssa/forwprop-6.c: Scan ccp1 dump instead. * gcc.dg/strlenopt-8.c: Adjust and XFAIL for non_strict_align target due to memcpy inline-expansion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216728 138bc75d-0d04-0410-961f-82ee72b054a4
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 Andreas Schwab sch...@linux-m68k.org changed: What|Removed |Added Target Milestone|--- |5.0 --- Comment #2 from Andreas Schwab sch...@linux-m68k.org --- Also breaks gcc.dg/vect/vect-strided-a-u8-i2-gap.c $ gcc/xgcc -Bgcc/ ../gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c -ftree-vectorize -fno-vect-cost-model -fno-common -O2 -fdump-tree-vect-details -lm -o ./vect-strided-a-u8-i2-gap.exe ../gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c: In function ‘main1’: ../gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c:34:16: internal compiler error: in expand_expr_real_2, at expr.c:9156 res[i].b = ptr-a; ^ 0x4059052f expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ../../gcc/expr.c:9156 0x40579c1f expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:9463 0x4058b71f store_expr(tree_node*, rtx_def*, int, bool) ../../gcc/expr.c:5344 0x4059701f expand_assignment(tree_node*, tree_node*, bool) ../../gcc/expr.c:5130 0x40381b7f expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3285 0x40381b7f expand_gimple_stmt ../../gcc/cfgexpand.c:3381 0x4038d89f expand_gimple_basic_block ../../gcc/cfgexpand.c:5216 0x403916ef execute ../../gcc/cfgexpand.c:5822
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2014-10-28 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #3 from Richard Biener rguenth at gcc dot gnu.org --- I will have a look. Can you attach preprocessed source so I can investigate with a cross? Thx.
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 --- Comment #4 from Jiong Wang jiwang at gcc dot gnu.org --- Created attachment 33827 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33827action=edit ./cc1 -O3 pr45752.i upload testcase. ./cc1 (generated by--target=aarch64-elf) -O3 pr45752.i
[Bug tree-optimization/63666] [5.0 regression] FAIL: gcc.dg/vect/pr45752.c (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63666 --- Comment #5 from Richard Biener rguenth at gcc dot gnu.org --- Ok, reproduced with a ia64 cross and a cut-down testcase w/o includes.