[LLVMbugs] [Bug 14158] New: [loop vectorize] Can't vectorize simple loop generated by clang

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 23 10:10:08 PDT 2012


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

             Bug #: 14158
           Summary: [loop vectorize] Can't vectorize simple loop generated
                    by clang
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: paul.redmond at intel.com
                CC: llvmbugs at cs.uiuc.edu, nrotem at apple.com
    Classification: Unclassified


Compiling the following program with "clang++ -S -emit-llvm test.cpp -o - -O2
-mllvm -vectorize" does not produce a vectorized add as I expect it should.

#include <cstddef>
int main()
{
  int size = 1000;
  float *A = new float(size);
  float *B = new float(size);
  float *C = new float(size);

  for (int i = 0; i < size; i++) {
    C[i] = A[i] + B[i];
  }

  return (int)C[0];
}

-- 
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.



More information about the llvm-bugs mailing list