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: unassignedb...@nondot.org
          Reporter: david.bolvan...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to