[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 --- Comment #14 from Richard Biener --- Author: rguenth Date: Wed Feb 8 13:13:53 2017 New Revision: 245278 URL: https://gcc.gnu.org/viewcvs?rev=245278=gcc=rev Log: 2017-02-08 Richard BienerBackport from mainline 2017-02-08 Richard Biener PR tree-optimization/71824 PR tree-optimization/79409 * gcc.dg/graphite/pr71824-3.c: New testcase. 2017-02-08 Richard Biener PR tree-optimization/71824 * graphite-scop-detection.c (scop_detection::build_scop_breadth): Check all loops contained in the merged region. * gcc.dg/graphite/pr71824-2.c: New testcase. 2017-02-01 Richard Biener PR tree-optimization/71824 * graphite-scop-detection.c (scop_detection::build_scop_breadth): Verify the loops are valid in the merged SESE region. (scop_detection::can_represent_loop_1): Check analyzing the evolution of the number of iterations in the region succeeds. * gcc.dg/graphite/pr71824.c: New testcase. 2017-01-31 Richard Biener PR tree-optimization/77318 * graphite-sese-to-poly.c (extract_affine): Fix assert. (create_pw_aff_from_tree): Take loop parameter. (add_condition_to_pbb): Pass loop of the condition to create_pw_aff_from_tree. Added: branches/gcc-6-branch/gcc/testsuite/gcc.dg/graphite/pr71824-2.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/graphite/pr71824-3.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/graphite/pr71824.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/graphite-scop-detection.c branches/gcc-6-branch/gcc/graphite-sese-to-poly.c branches/gcc-6-branch/gcc/testsuite/ChangeLog
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #13 from Richard Biener --- Fixed.
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 --- Comment #12 from Richard Biener --- Author: rguenth Date: Tue Jan 31 14:44:37 2017 New Revision: 245064 URL: https://gcc.gnu.org/viewcvs?rev=245064=gcc=rev Log: 2017-01-31 Richard BienerPR tree-optimization/77318 * graphite-sese-to-poly.c (extract_affine): Fix assert. (create_pw_aff_from_tree): Take loop parameter. (add_condition_to_pbb): Pass loop of the condition to create_pw_aff_from_tree. Modified: trunk/gcc/ChangeLog trunk/gcc/graphite-sese-to-poly.c
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #11 from Richard Biener --- Patch posted.
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 --- Comment #10 from Richard Biener --- Ok, so the issue is we have a region that is inside of loop 1 but does not fully cover it and in /* Returns a linear expression for tree T evaluated in PBB. */ static isl_pw_aff * create_pw_aff_from_tree (poly_bb_p pbb, tree t) { scop_p scop = PBB_SCOP (pbb); t = scalar_evolution_in_region (scop->scop_info->region, pbb_loop (pbb), t); when analyzing _62 from a condition on a block inside the region (the blocks loop father is loop 1) pbb_loop returns loop 3 (pbb->black_box->bb is its loop header). _62 is defined inside the region, but then if (TREE_CODE (t) != SSA_NAME || loop_in_sese_p (loop, region)) /* FIXME: we would need instantiate SCEV to work on a region, and be more flexible wrt. memory loads that may be invariant in the region. */ return instantiate_scev (before, loop, analyze_scalar_evolution (loop, t)); here loop is loop 3 and thus we call analyze_scalar_evolution with bogus input which just returns t, instantiate_scev then instantiates it to (integer(kind=8)) (integer(kind=4)) {(unsigned int) pretmp_123 + 4294967295, +, 1}_1 but this has an evolution in a loop that is not in the region and boom. Eventually that pbb is bogus from the start or rather that we are using pbb when adding dominating conditions(?). Index: gcc/graphite-sese-to-poly.c === --- gcc/graphite-sese-to-poly.c (revision 245052) +++ gcc/graphite-sese-to-poly.c (working copy) @@ -436,11 +436,11 @@ extract_affine (scop_p s, tree e, __isl_ /* Returns a linear expression for tree T evaluated in PBB. */ static isl_pw_aff * -create_pw_aff_from_tree (poly_bb_p pbb, tree t) +create_pw_aff_from_tree (poly_bb_p pbb, loop_p loop, tree t) { scop_p scop = PBB_SCOP (pbb); - t = scalar_evolution_in_region (scop->scop_info->region, pbb_loop (pbb), t); + t = scalar_evolution_in_region (scop->scop_info->region, loop, t); gcc_assert (!chrec_contains_undetermined (t)); gcc_assert (!automatically_generated_chrec_p (t)); @@ -455,8 +455,9 @@ create_pw_aff_from_tree (poly_bb_p pbb, static void add_condition_to_pbb (poly_bb_p pbb, gcond *stmt, enum tree_code code) { - isl_pw_aff *lhs = create_pw_aff_from_tree (pbb, gimple_cond_lhs (stmt)); - isl_pw_aff *rhs = create_pw_aff_from_tree (pbb, gimple_cond_rhs (stmt)); + loop_p loop = gimple_bb (stmt)->loop_father; + isl_pw_aff *lhs = create_pw_aff_from_tree (pbb, loop, gimple_cond_lhs (stmt)); + isl_pw_aff *rhs = create_pw_aff_from_tree (pbb, loop, gimple_cond_rhs (stmt)); isl_set *cond; switch (code) fixes that but then we ICE in #1 0x019bfc12 in extract_affine (s=0x2ab42a0, e=, space=0x2ae7790) at /space/rguenther/src/svn/gcc-7-branch/gcc/graphite-sese-to-poly.c:409 408 case SSA_NAME: 409 gcc_assert (-1 != parameter_index_in_region_1 (e, s->scop_info) 410 || !invariant_in_sese_p_rec (e, s->scop_info->region, NULL)); because the SSA name failed to register as parameter(?) - it is actually defined inside! But we run into tree scalar_evolution_in_region (const sese_l , loop_p loop, tree t) { ... if (invariant_in_sese_p_rec (t, region, _vdefs)) return t; which looks correct -- but it seems that extract_affine assumes we "instantiate" an expression up to the regions params... So maybe that assert is just another bogus one or scalar_evolution_in_region is bogus (instantiating before the region entry returns a chrec with an evolution in a loop not inside the region again...). Well. Doing Index: gcc/graphite-sese-to-poly.c === --- gcc/graphite-sese-to-poly.c (revision 245052) +++ gcc/graphite-sese-to-poly.c (working copy) @@ -407,7 +407,7 @@ extract_affine (scop_p s, tree e, __isl_ case SSA_NAME: gcc_assert (-1 != parameter_index_in_region_1 (e, s->scop_info) - || !invariant_in_sese_p_rec (e, s->scop_info->region, NULL)); + || defined_in_sese_p (e, s->scop_info->region)); res = extract_affine_name (s, e, space); break; fixes the testcase and still passes graphite.exp for all languages w/ {,-m32}.
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 --- Comment #9 from Bill Schmidt --- Seen also on powerpc64-unknown-linux-gnu, but not on powerpc64le-unknown-linux-gnu.
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 John David Anglin changed: What|Removed |Added CC||danglin at gcc dot gnu.org --- Comment #8 from John David Anglin --- Also seen on hppa64-hp-hpux11.11.
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 Jeffrey A. Law changed: What|Removed |Added Priority|P3 |P4 CC||law at redhat dot com
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 Dominique d'Humieres changed: What|Removed |Added CC||hjl.tools at gmail dot com --- Comment #7 from Dominique d'Humieres --- *** Bug 71348 has been marked as a duplicate of this bug. ***
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 --- Comment #6 from Tom de Vries --- In extract_affine_chrec we have: ... unsigned pos = sese_loop_depth (s->scop_info->region, get_chrec_loop (e)) - 1; isl_aff *loop = isl_aff_set_coefficient_si (isl_aff_zero_on_domain (ls), isl_dim_in, pos, 1); ... The immediate cause of the ICE is that sese_loop_depth returns 0, so pos ends up with value UINT_MAX. This causes the out-of-bounds error during the call to isl_aff_set_coefficient_si.
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 Dominique d'Humieres changed: What|Removed |Added Target|aarch64-*-* | CC||vries at gcc dot gnu.org --- Comment #5 from Dominique d'Humieres --- > It already failed at r236449 for both -m32 and -m64. Likely r236440. > It stopped to fail for -m32 between r236902 and r236930. Reduced range from https://gcc.gnu.org/ml/gcc-regression/2016-05/msg00587.html: between r236906 and r236909, likely 236907.
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 --- Comment #4 from Dominique d'Humieres --- > It actually started between r236439 and r236491. It already failed at r236449 for both -m32 and -m64. It stopped to fail for -m32 between r236902 and r236930.
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 Andreas Schwabchanged: What|Removed |Added Blocks||70729 --- Comment #3 from Andreas Schwab --- Already noted in PR70729. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70729 [Bug 70729] Loop marked with omp simd pragma is not vectorized
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 Andreas Schwabchanged: What|Removed |Added Blocks|77290 | --- Comment #2 from Andreas Schwab --- It actually started between r236439 and r236491. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77290 [Bug 77290] [7 regression] test case gcc.dg/tree-ssa/pr71347.c fails starting with r239565
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-08-22 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres --- Confirmed. Note that the test has been failing since a long time up to revision r239564 and passed only in the range r239565 to r239606.
[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318 Richard Biener changed: What|Removed |Added Target Milestone|--- |7.0