public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/41118]  New: Wrong dependence analysis in graphite for unrestricted pointers
@ 2009-08-19 12:07 amonakov at gcc dot gnu dot org
  2009-08-19 16:02 ` [Bug tree-optimization/41118] " spop at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: amonakov at gcc dot gnu dot org @ 2009-08-19 12:07 UTC (permalink / raw)
  To: gcc-bugs

Consider this example: 

cat > pr41118.c <<EOF

void foo(int n, int *a, int *b)
{
  int i;
  for (i = 0; i < n; i++)
    a[i] = b[i];
}

EOF

gcc -S -O2 pr41118.c -floop-parallelize-all -ftree-parallelize-loops=2

grep GOMP 41118.s

GCC considers the loop parallel, even though arrays pointed to by arguments may
arbitrarily overlap.  This is because dependency analysis in graphite treats
p[i] as global_mem[alias_set_for_p][i]. In this example, since both a and b
have
alias set 0, a[0][i0] and b[0][i1] are considered independent for i0 != i1.


-- 
           Summary: Wrong dependence analysis in graphite for unrestricted
                    pointers
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amonakov at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-25  4:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-19 12:07 [Bug tree-optimization/41118] New: Wrong dependence analysis in graphite for unrestricted pointers amonakov at gcc dot gnu dot org
2009-08-19 16:02 ` [Bug tree-optimization/41118] " spop at gcc dot gnu dot org
2009-08-19 16:27 ` amonakov at gcc dot gnu dot org
2009-09-20 10:47 ` lifeng at gcc dot gnu dot org
2009-11-25  4:49 ` spop at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).