public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/45022]  New: No prefetch for the vectorized loop
@ 2010-07-21 18:04 changpeng dot fang at amd dot com
  2010-07-21 18:06 ` [Bug tree-optimization/45022] " rguenth 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-07-21 18:04 UTC (permalink / raw)
  To: gcc-bugs

For the following test case, if we compile with -O3 -fprefetch-loop-arrays
-march=amdfam10, the loop is versioned (for runtime alias checking) to be
vectorized. However, we see prefetches in the non-vectorize version, but
not in the vectorized version.

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

For the vectorized loop, in tree-ssa-loop-arrays.c (idx_analyze_ref):
 if (TREE_CODE (base) == MISALIGNED_INDIRECT_REF
      || TREE_CODE (base) == ALIGN_INDIRECT_REF)
    return false;

FALSE is returned due to mis-aligned indirect reference:
M*vect_p.18_61{misalignment: 0}
M*vect_p.23_66{misalignment: 0}
M*vect_p.31_74{misalignment: 0}


-- 
           Summary: No prefetch for the vectorized loop
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        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=45022


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

end of thread, other threads:[~2010-11-01 22:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45022-4@http.gcc.gnu.org/bugzilla/>
2010-11-01 22:22 ` [Bug tree-optimization/45022] No prefetch for the vectorized loop changpeng.fang at amd dot com
2010-07-21 18:04 [Bug tree-optimization/45022] New: " changpeng dot fang at amd dot com
2010-07-21 18:06 ` [Bug tree-optimization/45022] " rguenth at gcc dot gnu dot org
2010-07-22 20:52 ` changpeng dot fang at amd dot com
2010-07-22 21:17 ` rakdver at kam dot mff dot cuni dot cz
2010-07-29 19:14 ` changpeng dot fang at amd dot com
2010-07-30  8:41 ` rguenther at suse dot de

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).