peixin added a comment. The following test case fails after https://reviews.llvm.org/rGaf000197c4214926bd7d0862d86f89aed5f20da6.
#include <iostream> using namespace std; int main() { float a[10]; int i, N = 10; for (i = 0; i < N; i++) a[i] = 0; #pragma omp simd for (i = 0; i < N; i++) { #pragma omp ordered simd a[i] = a[i-1] + 1.0; } for (i = 0; i < N; i++) cout << a[i] << " "; cout << endl; } $ clang++ -fopenmp simd.cpp && ./a.out 1 2 3 4 5 6 7 8 9 10 $ clang++ -fopenmp -O1 simd.cpp && ./a.out 1 1 1 1 2 1 1 1 2 3 It is fixed by this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109321/new/ https://reviews.llvm.org/D109321 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits