[PATCH] D109321: [clang][OpenMP] Fix the bug in codegen for ordered directive

Peixin Qiao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 7 06:31:00 PDT 2021


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



More information about the cfe-commits mailing list