This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/45450] [graphite] some programs do not pass the legality check


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45450

Sebastian Pop <spop at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |spop at gcc dot gnu.org
         Resolution|                            |INVALID

--- Comment #1 from Sebastian Pop <spop at gcc dot gnu.org> 2011-07-26 21:07:33 UTC ---
I went to investigate this bug, and I found out that inserting
  gcc_assert (graphite_legal_transform (scop));
is invalid: the legality function is not supposed to return true
when the dependence analysis cannot be performed at compile time.

On the particular case of id-1.c, we have this code:

lambda_vector_add_mc (lambda_vector vec1, int const1,
              lambda_vector vec2, int const2,
              lambda_vector vec3, int size)
{
  int i;
  for (i = 0; i < size; i++)
    vec3[i] = const1 * vec1[i] + const2 * vec2[i];
}

and the assert would fail because the dependence analysis
returns a relation classified as unknown because it is not
possible to prove that vec1 and vec3 do not alias:

  if (!(pdr_read_p (pdr1) && pdr_read_p (pdr2))
      && PDR_BASE_OBJECT_SET (pdr1) != PDR_BASE_OBJECT_SET (pdr2)
      && may_alias)
    PDDR_KIND (res) = unknown_dependence;

I investigated the other fails that I can see today on trunk:

FAIL: gcc.dg/graphite/scop-matmult.c (internal compiler error)
FAIL: gcc.dg/graphite/scop-mvt.c (internal compiler error)
FAIL: gcc.dg/graphite/id-1.c (internal compiler error)
FAIL: gcc.dg/graphite/run-id-pr42644.c (internal compiler error)
FAIL: gcc.dg/graphite/interchange-14.c (internal compiler error)
FAIL: gcc.dg/graphite/interchange-15.c (internal compiler error)
FAIL: gcc.dg/graphite/interchange-mvt.c (internal compiler error)
FAIL: gcc.dg/graphite/pr31183.c (internal compiler error)
FAIL: gcc.dg/graphite/pr38510.c (internal compiler error)
FAIL: gcc.dg/graphite/pr38786.c (internal compiler error)
FAIL: gcc.dg/graphite/pr42211.c (internal compiler error)

FAIL: libgomp.graphite/pr41118.c (internal compiler error)

FAIL: gfortran.dg/graphite/pr29581.f90  -O0  (internal compiler error)
FAIL: gfortran.dg/graphite/pr29832.f90  -O0  (internal compiler error)
FAIL: gfortran.dg/graphite/pr42334-1.f  -O  (internal compiler error)
FAIL: gfortran.dg/graphite/pr42393-1.f90  -O  (internal compiler error)
FAIL: gfortran.dg/graphite/pr42393.f90  -O  (internal compiler error)

when run in gdb, they all break on the statement before ICE-ing:
  PDDR_KIND (res) = unknown_dependence;

I am closing this bug as invalid.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]