[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
Mon Sep 6 07:08:56 PDT 2021


peixin added a comment.

In D109321#2985284 <https://reviews.llvm.org/D109321#2985284>, @jhuber6 wrote:

> In D109321#2985281 <https://reviews.llvm.org/D109321#2985281>, @lebedev.ri wrote:
>
>> Aha. But i don't think this is the right fix,
>> the fact that the inlining manifests the miscompile is a symptom.
>
> Preventing the outlined region from being inlined would also hurt OpenMP performance considerably.

Please notice that this remove is only inside `emitOutlinedOrderedFunction`, which is only used when `ordered simd` directive is there. According to OpenMP 5.0 Spec, the ordered construct either specifies a structured block in a worksharing-loop, simd, or worksharing-loop SIMD region that will be executed in the order of the loop iterations.


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