[PATCH] D109321: [clang][OpenMP] Fix the bug in codegen for ordered directive
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 7 13:36:09 PDT 2021
jhuber6 added a comment.
In D109321#2986678 <https://reviews.llvm.org/D109321#2986678>, @peixin wrote:
> $ 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.
Just to prevent the IR from changing when optimizations aren't enabled.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109321/new/
https://reviews.llvm.org/D109321
More information about the cfe-commits
mailing list