https://llvm.org/bugs/show_bug.cgi?id=26110
Bug ID: 26110 Summary: clang c compiler produces wrong result for the attached c code with -O2 optimzation Product: clang Version: 3.7 Hardware: Macintosh OS: MacOS X Status: NEW Severity: release blocker Priority: P Component: LLVM Codegen Assignee: unassignedclangb...@nondot.org Reporter: garunsriniva...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 15602 --> https://llvm.org/bugs/attachment.cgi?id=15602&action=edit C file that reproduces the problem A bug in the llvm auto vectoizer produces wrong results for the attached c file. Turning off auto vectorizer produces the right results, but makes the bigger test cases run much slower. Compile the attached c file with xcode 7.0x or later with (clang-700.1.81) (based on LLVM 3.7.0svn) with the following command: bad result: =============================== % clang -O2 bug.c -Wall -o bad % ./bad dbg = 10 10 10 10 10 10 10 10 good result: =============================== % clang -O2 -fno-vectorize bug.c -Wall -o bad %./bad dbg = 15 15 15 15 15 15 15 15 gcc 4.7 % gcc -O2 bug.c -Wall -o bad % ./bad dbg = 15 15 15 15 15 15 15 15 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs