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

             Bug #: 14448
           Summary: [loopvectorize] multiple vector loops generated from
                    single scalar loop
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: code-quality
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


I think this is a known issue but..

If you compile the following program with vectorize-loops enabled multiple
vector loops are generated because the scalar loop is processed by
LoopVectorize twice.

#include <numeric>

int foo(int *A, int n)
{
  return std::accumulate(A, A + n, 0);
}

The generated code is correct but not desirable.

compile with:
clang++ -S -emit-llvm accum.cpp -O2 -mllvm -vectorize-loops -o -

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to