[llvm-bugs] [Bug 35879] New: Loop Vectorizer does not handle masked gather

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 9 12:47:50 PST 2018


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

            Bug ID: 35879
           Summary: Loop Vectorizer does not handle masked gather
           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)
       if (r[j] < 1024)
            r[j] = *(ptr++);
}

https://software.intel.com/en-us/node/523959

$ 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

https://godbolt.org/g/8HNuay

Oddly enough when simply changing the return type to void the loop unroller
takes over and no vectorization is attempted at all (which is kind of common
with clang).

-- 
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/2293f088/attachment.html>


More information about the llvm-bugs mailing list