public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/43427]  New: The loop is not interchanged and thus could not be vectorized.
@ 2010-03-18 18:37 changpeng dot fang at amd dot com
  2010-03-18 18:41 ` [Bug tree-optimization/43427] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: changpeng dot fang at amd dot com @ 2010-03-18 18:37 UTC (permalink / raw)
  To: gcc-bugs

chfang@pathscale:~/gcc$ cat foo.c
float a[100][100], b[100][100];

void foo(int n)
{
  int i, j;
  for(j=0; j<n; j++)
    for(i=0; i< n; i++)
      a[i][j] = a[i][j] + b[i][j]; 
}
chfang@pathscale:~/gcc$ gcc -O3 -ftree-vectorizer-verbose=2 -c foo.c

foo.c:6: note: not vectorized: can't create epilog loop 2.
foo.c:7: note: not vectorized: complicated access pattern.
foo.c:3: note: vectorized 0 loops in function.

Information from open64:
chfang@pathscale:~/gcc$ opencc -O3 -LNO:simd_verbose=on -c foo.c
(foo.c:0) LOOP WAS VECTORIZED.
(foo.c:0) LOOP WAS VECTORIZED.
chfang@pathscale:~/gcc$ opencc -O3 -LNO:simd_verbose=on:interchange=0 -c foo.c
(foo.c:0) Non-contiguous array "a" reference exists. Loop was not vectorized.
(foo.c:0) Non-contiguous array "a" reference exists. Loop was not vectorized.


Graphite may be able to do this basic loop interchange.


-- 
           Summary: The loop is not interchanged and thus could not be
                    vectorized.
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: changpeng dot fang at amd dot com


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


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

* [Bug tree-optimization/43427] The loop is not interchanged and thus could not be vectorized.
  2010-03-18 18:37 [Bug c/43427] New: The loop is not interchanged and thus could not be vectorized changpeng dot fang at amd dot com
@ 2010-03-18 18:41 ` pinskia at gcc dot gnu dot org
  2010-03-18 18:59 ` spop at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-03-18 18:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2010-03-18 18:41 -------
-ftree-loop-linear can do it also; though neither graphite or that is on by
default.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2010-03-18 18:41:12
               date|                            |


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


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

* [Bug tree-optimization/43427] The loop is not interchanged and thus could not be vectorized.
  2010-03-18 18:37 [Bug c/43427] New: The loop is not interchanged and thus could not be vectorized changpeng dot fang at amd dot com
  2010-03-18 18:41 ` [Bug tree-optimization/43427] " pinskia at gcc dot gnu dot org
@ 2010-03-18 18:59 ` spop at gcc dot gnu dot org
  2010-03-18 19:01 ` spop at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-03-18 18:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from spop at gcc dot gnu dot org  2010-03-18 18:59 -------
In the output of ./cc1 -O3 -floop-interchange -fdump-tree-graphite-all
-ftree-vectorizer-verbose=7
we have: "Loops at depths 0 and 1 will be interchanged."
so we do the interchange, but then the vectorizer complains about:
"note: not vectorized: data ref analysis failed D.2729_41 = a[i_40][var.8_47];"


-- 


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


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

* [Bug tree-optimization/43427] The loop is not interchanged and thus could not be vectorized.
  2010-03-18 18:37 [Bug c/43427] New: The loop is not interchanged and thus could not be vectorized changpeng dot fang at amd dot com
  2010-03-18 18:41 ` [Bug tree-optimization/43427] " pinskia at gcc dot gnu dot org
  2010-03-18 18:59 ` spop at gcc dot gnu dot org
@ 2010-03-18 19:01 ` spop at gcc dot gnu dot org
  2010-04-01 19:00 ` spop at gcc dot gnu dot org
  2010-04-08 17:40 ` spop at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-03-18 19:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from spop at gcc dot gnu dot org  2010-03-18 19:01 -------
./cc1 -O3 -msse2 -ffast-math -ftree-vectorizer-verbose=2 pr43427.c
-ftree-loop-linear 

pr43427.c:6: note: not vectorized: complicated access pattern.
pr43427.c:7: note: LOOP VECTORIZED.
pr43427.c:3: note: vectorized 1 loops in function.


-- 


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


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

* [Bug tree-optimization/43427] The loop is not interchanged and thus could not be vectorized.
  2010-03-18 18:37 [Bug c/43427] New: The loop is not interchanged and thus could not be vectorized changpeng dot fang at amd dot com
                   ` (2 preceding siblings ...)
  2010-03-18 19:01 ` spop at gcc dot gnu dot org
@ 2010-04-01 19:00 ` spop at gcc dot gnu dot org
  2010-04-08 17:40 ` spop at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-04-01 19:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from spop at gcc dot gnu dot org  2010-04-01 18:59 -------
I think that this bug should be closed as fixed,
unless we change the subject to:
"At -O3 the loop is not interchanged and thus not vectorized".


-- 


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


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

* [Bug tree-optimization/43427] The loop is not interchanged and thus could not be vectorized.
  2010-03-18 18:37 [Bug c/43427] New: The loop is not interchanged and thus could not be vectorized changpeng dot fang at amd dot com
                   ` (3 preceding siblings ...)
  2010-04-01 19:00 ` spop at gcc dot gnu dot org
@ 2010-04-08 17:40 ` spop at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-04-08 17:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from spop at gcc dot gnu dot org  2010-04-08 17:40 -------
Fixed.


-- 

spop at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


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


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

end of thread, other threads:[~2010-04-08 17:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-18 18:37 [Bug c/43427] New: The loop is not interchanged and thus could not be vectorized changpeng dot fang at amd dot com
2010-03-18 18:41 ` [Bug tree-optimization/43427] " pinskia at gcc dot gnu dot org
2010-03-18 18:59 ` spop at gcc dot gnu dot org
2010-03-18 19:01 ` spop at gcc dot gnu dot org
2010-04-01 19:00 ` spop at gcc dot gnu dot org
2010-04-08 17:40 ` 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).