This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP]Fix PR50733: unexpected final value of list-item in linear clause in loop construct.
ClosedPublic

Authored by ABataev on Jun 29 2021, 2:07 PM.

Details

Summary

Currently the last value of linear is calculated as var = init + num_iters * step.
Replaced it with var = var_priv, i.e. original variable gets the value
of the last private copy.

Diff Detail

Event Timeline

ABataev created this revision.Jun 29 2021, 2:07 PM
ABataev requested review of this revision.Jun 29 2021, 2:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2021, 2:07 PM

If the problem exists, better to fix it before the next release.

This revision is now accepted and ready to land.Dec 2 2021, 12:55 PM
clang/test/OpenMP/target_parallel_for_codegen.cpp