[LLVMbugs] [Bug 15758] New: Incorrect vectorization of a long double array by packed vectors

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Apr 16 00:09:58 PDT 2013


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

            Bug ID: 15758
           Summary: Incorrect vectorization of a long double array by
                    packed vectors
           Product: clang
           Version: 3.2
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dtakahashi42 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

With loop-vectorizer is enabled by -mllvm -vectorize-loops, clang automatically
vectorizes the assignment on a long-double array (16 bytes aligned) by
assignment on 16-bytes-aligned-x86_fp80-packed vectors. Because of the
alignment mismatch between array's elements and packed elements, subsequent
access on the array produces incorrect result.

Below is the test case.
int main (void) {
  long double x[1027];

  for (int i = 0; i < 1027; i++) {
    x[i] = (long double) i;
  }

  for (int i = 0; i < 1027; i++) {
    assert (x[i] == (long double) i);
  }

  return 0;
}

-- 
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/20130416/e21a1e82/attachment.html>


More information about the llvm-bugs mailing list