peixin added a comment. $ clang++ -fopenmp simd.cpp -O1 -Xclang -disable-llvm-passes && ./a.out 0 1 2 3 4 5 6 7 8 9 $ clang++ -fopenmp simd.cpp -O2 && ./a.out 0 1 2 3 4 5 6 7 8 9 $ clang++ -fopenmp simd.cpp -O3 && ./a.out 0 1 2 3 4 5 6 7 8 9
This bug is not in clang frontend. I will post it in bugzilla. Another question is why not add `llvm::Attribute::AlwaysInline` when `CGM.getCodeGenOpts().OptimizationLevel` is 0? @jhuber6 I think it is correct to add the attribute when `CGM.getCodeGenOpts().OptimizationLevel` is 0. 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