[llvm-bugs] [Bug 49476] New: Missed loop vectorization

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 8 08:16:23 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49476

            Bug ID: 49476
           Summary: Missed loop vectorization
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: david.bolvansky at gmail.com
                CC: llvm-bugs at lists.llvm.org

#define M 32000
#define N 256

double a[M],x[N][N];

void compute()
{

    for (int j = 0; j < N; j++) {
            for (int i = j+1; i < N; i++) {
                a[i] -= x[j][i] * a[j];
            }
        }

}

With -Ofast, LLVM does not vectorize this code.


for a[j]:
remark: failed to move load with loop-invariant address because the loop may
invalidate its value [-Rpass-missed=licm]


https://godbolt.org/z/Gx6Px4

-- 
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/20210308/c0c5d090/attachment.html>


More information about the llvm-bugs mailing list