[llvm-bugs] [Bug 47553] New: Missing autovectorization

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 16 14:56:31 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47553

            Bug ID: 47553
           Summary: Missing autovectorization
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: david.bolvansky at gmail.com
                CC: llvm-bugs at lists.llvm.org

#define N 8
unsigned int out[N];
unsigned int in[N];

void
main1 (unsigned int x)
{

  for (int i = 0; i < N; ++i)
    out[i] = (in[i] + x) * i;

}


ICC vectorized this code. Clang did not. llvm mca shows that ICC code should be
faster. #pragma clang loop vectorize(enable) does nothing in this case.

https://godbolt.org/z/rjYdnb

-- 
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/20200916/d621603f/attachment.html>


More information about the llvm-bugs mailing list