[OpenMP] Fix non-determinism in clang copyin codegen
authorGiorgis Georgakoudis <georgakoudis1@llnl.gov>
Thu, 6 May 2021 01:28:23 +0000 (18:28 -0700)
committerGiorgis Georgakoudis <georgakoudis1@llnl.gov>
Thu, 6 May 2021 02:24:03 +0000 (19:24 -0700)
commitf97b843d8819f824dcc1b6afa746ce9a7a386db3
treef663e9e8d16baccc348045a329200eedd4591bf4
parent7b73cd684a8d5fb44d34064200f10e2723085c33
[OpenMP] Fix non-determinism in clang copyin codegen

Codegen for OpeMP copyin has non-deterministic IR output due to the unspecified evaluation order in a codegen conditional branch, which makes automatic test generation unreliable. This patch refactors codegen code to avoid this non-determinism.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D101952
clang/lib/CodeGen/CGStmtOpenMP.cpp