http://llvm.org/bugs/show_bug.cgi?id=16834
Bug ID: 16834
Summary: Clang Generates Incorrect Code With Certain Arch and
Optimization Combinations
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 11007
--> http://llvm.org/bugs/attachment.cgi?id=11007&action=edit
Test case
With the latest Clang/LLVM from SVN, the sample program abc.cpp produces
incorrect output when compiled with the optimization flags
-O3 -march=corei7-avx -fslp-vectorize -fslp-vectorize-aggressive
The problem goes away if -fslp-vectorize-aggressive is removed, and it also
goes away if -march=corei7-avx.
I am attaching sample C++ source for abc.cpp. I tried to narrow down this test
case, but this seems to be as simple as I can make it while sitting exhibiting
the problem. The sample program is based on code used in Qt 5 for working
with Bezier curves.
Correct output:
[10, 20], [30, 40], [50, 60], [70, 80]
[10, 20], [20, 30], [30, 40], [40, 50]
[40, 50], [50, 60], [60, 70], [70, 80]
Incorrect output produced as described above:
[10, 20], [30, 40], [50, 60], [70, 80]
[10, 20], [20, 30], [30, 40], [22.5, 50]
[22.5, 50], [45, 60], [60, 70], [70, 80]
I did attempt to use bugpoint, but I could not figure out how to produce any
output that seemed useful.
--
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