[llvm-bugs] [Bug 35878] New: Loop Vectorizer does not recognize packed load

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 9 12:35:22 PST 2018


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

            Bug ID: 35878
           Summary: Loop Vectorizer does not recognize packed load
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: trass3r at gmail.com
                CC: llvm-bugs at lists.llvm.org

#include <cstdint>
int foo(uint32_t* __restrict r, uint32_t* __restrict ptr)
{
    for (int j = 0; j < 8; ++j)
        r[j] = *(ptr++);
}

$ clang -std=c++14 -O3 -S -fverbose-asm -march=haswell
-Rpass-missed=loop-vectorize -Rpass-analysis=loop-vectorize test.cpp

loop control flow is not understood by vectorizer

Oddly enough it does work when changing the return type to void!

https://godbolt.org/g/5uvodB

-- 
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/20180109/90205178/attachment.html>


More information about the llvm-bugs mailing list