[LLVMbugs] [Bug 14803] New: Incorrect loop vectorization for reduction involving subtract

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 4 12:54:52 PST 2013


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: unassignedbugs at nondot.org
        ReportedBy: paul.redmond at intel.com
                CC: llvmbugs at cs.uiuc.edu, nrotem at apple.com,
                    wei.pan at intel.com
    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.



More information about the llvm-bugs mailing list