[LLVMbugs] [Bug 22526] New: loop vectorizer fails to optimize dot product

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 9 17:07:44 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22526

            Bug ID: 22526
           Summary: loop vectorizer fails to optimize dot product
           Product: new-bugs
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ralph.campbell at broadcom.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

clang fails to optimize what looks like a very simple loop to me.
(run on ARM "Juno" box running Fedora 22 and using gcc 4.9.2 to compile llvm)

$ cat test.c
float foo(float *b, float *c) {
  int i;
  float v = 0.0;
  for(i = 0; i < 1000; i++) {
    v += b[i] + c[i];
  }
  return v;
}
$ clang -S -O3 -Rpass-analysis=loop-vectorize test.c
test.c:8:1: remark: loop not vectorized: value that could not be identified as
      reduction is used outside the loop [-Rpass-analysis=loop-vectorize]
}
^
test.c:8:1: note: could not determine the original source location for :0:0

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150210/c9ef7b9b/attachment.html>


More information about the llvm-bugs mailing list