http://llvm.org/bugs/show_bug.cgi?id=14803
Bug #: 14803
Summary: Incorrect loop vectorization for reduction involving
subtract
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Subtraction is recognized as a reduction however this does not work in general
because subtraction is not commutative. The following snippit is incorrectly
vectorized:
int x = 0;
for (int i = 0; i < N; ++i) {
x = A[i] - x; // is correct for x = x - A[i]
}
return x
--
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